621 Commits (97f8ac8c76634e144b16479a25d93692b90d7fe2)
 

Author SHA1 Message Date
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
Vincent Driessen 91fff48389 Flake8. 13 years ago
Vincent Driessen e807748ee6 Test the timing out of jobs.
Really looking for a way to speed up this test.  It takes up a whole
second doing nothing now, really.
13 years ago
Vincent Driessen 9ac9c23412 Flake8. 13 years ago
Vincent Driessen 000849c430 Initialize jobs with timeouts. 13 years ago
Vincent Driessen b8305a818f Safer, and shorter, version of the death penalty.
This case protects against JobTimeoutExceptions being raised immediately
after the job body has been (successfully) executed.  Still,
JobTimeoutExceptions pass through naturally, like any other exception,
to be handled by the default exception handler that writes failed jobs
to the failed queue.

Timeouts therefore are reported like any other exception.
13 years ago
Vincent Driessen 8a856e79ea Initial attempt at job timeouts. 13 years ago