727 Commits (adc24b6fe0bcf3b95e8eb44b1601dab1ee1aacb3)
 

Author SHA1 Message Date
Vincent Driessen a5d9ed0a0d Add change notes. 13 years ago
Vincent Driessen 12c5189706 Merge pull request #71 from selwin/worker-connection
Make "connection" argument passing-around consistent to work with Workers, too.
13 years ago
Vincent Driessen f5951900c8 Make unit tests compatible with Python < 2.7. 13 years ago
Vincent Driessen b45770cd3c Fix unit test expressions. 13 years ago
Selwin Ong 50ba003cee Worker's "all" and "find_by_key" methods should accept "connection" as argument. 13 years ago
Vincent Driessen c423cab770 Bump version number. 13 years ago
Vincent Driessen 8aaa975fa9 Find all packages.
This fixes #67.
13 years ago
Vincent Driessen f958d26dfd Add change log. 13 years ago
Vincent Driessen 7c69ad9182 Bump the version number. 13 years ago
Vincent Driessen 11f91508c6 Merge pull request #63 from selwin/master
Queue.lpop now takes connection as an argument. Thanks, @selwin!
13 years ago
Vincent Driessen b47fc4aa14 Merge pull request #59 from wichert/console-scripts
Refactor scripts. Thanks, @wichert!
13 years ago
Selwin Ong 5989228330 Queue.lpop should take connection as argument. 13 years ago
Wichert Akkerman ec0e4776b4 Move common code out. 13 years ago
Wichert Akkerman 9f7d608da8 Renaming typo.. 13 years ago
Wichert Akkerman 2d4a58631d PyFlakes 13 years ago
Wichert Akkerman 97d2e4d784 Use console_scripts instead of scripts.
Unfortunately zc.buildout does not support distribute/setuptools script
option (see https://bugs.launchpad.net/zc.buildout/+bug/422724), but it
does support console_scripts. This also makes the scripts importable,
allowing for unittest and code reuse.
13 years ago
Vincent Driessen 1d27223069 Merge pull request #56 from mattdennewitz/master
Class methods use given class, not hard-coded class
13 years ago
mattdennewitz 9f2f9e367c Class methods now use given "cls" 13 years ago
Vincent Driessen bbfe621bd1 Mention python-requests.org, for completeness sake. 13 years ago
Vincent Driessen 42c3b593f9 Fix typo in basic example. 13 years ago
Vincent Driessen b886ba76de Fix AttributeError. 13 years ago
Vincent Driessen c337afde3a Make the connection stack thread safe.
For this, I've included Werkzeug's context locals, which offers both
thread and greenlet safe local variables.

This fixes #47.
13 years ago
Vincent Driessen 282f4be931 Merge branch 'total-ordering-fix' 13 years ago
Vincent Driessen 25d3f94c9f Use the true Python 2.7 stdlib implementation instead. 13 years ago
Vincent Driessen 4885458dde Move this hack to a separate file. 13 years ago
Vincent Driessen c642df93b9 Don't use dict comprehension. It's Python 2.7 only.
This fixes #51.
13 years ago
aiko1895 d26db69cbd added backport of total_ordering to work with 2.6 13 years ago
Vincent Driessen 100d23b72e Tag the first public release. 13 years ago
Vincent Driessen ccc9abd8fa Fix wording. 13 years ago
Vincent Driessen 166a79a0fd Fix documentation URL. 13 years ago
Vincent Driessen 506f7c9e17 Fix incorrect API call in the README example. 13 years ago
Vincent Driessen 31e492644e Fix year. 13 years ago
Vincent Driessen b0c9ab168d Never refresh when stdout is not a TTY.
This fixes #43.
13 years ago
Vincent Driessen 59aebf8676 Don't filter when no queues are explicitly specified.
This caused the workers from omitting empty queues from workers, as if
they were not listening on them.
13 years ago
Vincent Driessen 2e5f537abd Rewrite rqinfo to start polling by default.
The options to show only partial info (only workers, only queues) are
kept, but not default anymore.  This makes the default invocation
(without args) the most useful one.

The default refresh interval is 2.5 seconds.

This fixes #42.
13 years ago
Vincent Driessen a7c229ddb1 Reflect new API in the RQ scripts. 13 years ago
Vincent Driessen 2982486448 New connection management.
Connections can now be set explicitly on Queues, Workers, and Jobs.
Jobs that are implicitly created by Queue or Worker API calls now
inherit the connection of their creator's.

For all RQ object instances that are created now holds that the
"current" connection is used if none is passed in explicitly.  The
"current" connection is thus hold on to at creation time and won't be
changed for the lifetime of the object.

Effectively, this means that, given a default Redis connection, say you
create a queue Q1, then push another Redis connection onto the
connection stack, then create Q2. In that case, Q1 means a queue on the
first connection and Q2 on the second connection.

This is way more clear than it used to be.

Also, I've removed the `use_redis()` call, which was named ugly.
Instead, some new alternatives for connection management now exist.

You can push/pop connections now:

    >>> my_conn = Redis()
    >>> push_connection(my_conn)
    >>> q = Queue()
    >>> q.connection == my_conn
    True
    >>> pop_connection() == my_conn

Also, you can stack them syntactically:

    >>> conn1 = Redis()
    >>> conn2 = Redis('example.org', 1234)
    >>> with Connection(conn1):
    ...     q = Queue()
    ...     with Connection(conn2):
    ...         q2 = Queue()
    ...     q3 = Queue()
    >>> q.connection == conn1
    True
    >>> q2.connection == conn2
    True
    >>> q3.connection == conn1
    True

Or, if you only require a single connection to Redis (for most uses):

    >>> use_connection(Redis())
13 years ago
Vincent Driessen a662180fd3 Make importlib dependency conditional on the Python version. 13 years ago
Vincent Driessen 6bc173f122 Bugfix. 13 years ago
Vincent Driessen 28216cf63a Implement the requeue_job() top-level API function.
This completely fixes #37.
13 years ago
Vincent Driessen c684949045 Don't expose the FailedQueue class at the top-level.
This fixes #36.
13 years ago
Vincent Driessen 98ea29b15a Don't expose the Job class at the top-level.
This partially fixes #37.
13 years ago
Vincent Driessen 0b837b4b12 Don't warn. In fact, we rely on this the more. 13 years ago
Vincent Driessen 2b6101d110 Move job from Worker to Job test suite. 13 years ago
Vincent Driessen 15342f14d3 Store pickled function calls as strings.
This aids unpacking in the case of a function that isn't importable from
the worker's runtime. The unpickling will now (almost) always succeed,
and throw an ImportError later on, when the function is actually
accessed (thus imported implicitly).

The end result is a job on the failed queue, with exc_info describing
the import error, which is tremendously useful.
13 years ago
Vincent Driessen 14ecb8e956 Add specifics on the "ImportError" to the message in case of an attribute error. 13 years ago
Vincent Driessen be8f7684aa Fix accidentally passing unit test. 13 years ago
Vincent Driessen df2b2838de Merge branch 'timeouts'
This fixes #12.
13 years ago
Vincent Driessen 3c05f20d95 Flake8. 13 years ago
Vincent Driessen 844c5ed8c7 Add @slow wrapper to avoid running slow tests.
Use ./run_tests -f to only run the fast tests.
13 years ago