31 Commits (370399f8f7331b32961b948fe5846303e6fa63fa)

Author SHA1 Message Date
Vincent Driessen 370399f8f7 CHECKPOINT: dequeue_any now returns the queue that was popped from. 13 years ago
Vincent Driessen f516f8df2e CHECKPOINT: Handle failing and unreadable jobs.
Failing (or unreadable) jobs are correctly put on the failure queue by
the worker now.
13 years ago
Vincent Driessen b1650cb9b9 CHECKPOINT: Second part of the big refactoring.
Jobs are now stored in separate keys, and only job IDs are put on Redis
queues.  Much of the code has been hit by this change, but it is for the
good.

No really.
13 years ago
Vincent Driessen 65105b44c3 CHECKPOINT: Initial part of the big refactor. 13 years ago
Vincent Driessen fcca48a9d7 Rename empty property -> is_empty() method. 13 years ago
Vincent Driessen 4d2f64d4b6 Mental note to self. 13 years ago
Vincent Driessen 7eb8d92605 Put unreadable tasks on the failure queue. 13 years ago
Vincent Driessen 0be1cb6ac0 Change the way jobs are pickled.
There is no job tuple anymore, but instead Jobs are picklable by
themselves natively.  Furthermore, I've added a way to annotate Jobs
with created_at and enqueued_at timestamps, to drive any future Job
performance stats.  (And to enable requeueing, while keeping hold of the
queue that the Job originated from.)

This fixes #17.
13 years ago
Vincent Driessen db5753b0d6 Put Job in its own file. 13 years ago
Vincent Driessen 210477c2ab Throw DequeueError when reading unprocessable data from queue. 13 years ago
Vincent Driessen 62ae299114 Fix mathematical meaning of the < operator.
This is used for alphabetical queue ordering.
13 years ago
Vincent Driessen 8678f26df0 Factor out call string. 14 years ago
Vincent Driessen 2ec12f1775 Fix bugje. 14 years ago
Vincent Driessen 1358246238 Better logging output. 14 years ago
Vincent Driessen cc8f05b3c6 Add __str__ to Job. 14 years ago
Vincent Driessen edcc012b2d Document the Queue class. 14 years ago
Vincent Driessen a905961f94 Add some sample scripts. 14 years ago
Vincent Driessen 0ff2984adf Use __slots__, for minimal memory overhead. 14 years ago
Vincent Driessen b5ea5f32fe Variable renamed. 14 years ago
Vincent Driessen 8852859fc4 Improved the __repr__ and __str__ of Queues. 14 years ago
Vincent Driessen b4c1c85276 Add equality and comparison methods. 14 years ago
Vincent Driessen a5ea45af57 Make the dequeue methods return values consistent.
I merely refactored the internal calls. No external API changes have been made in this commit. In order to make the dequeueing methods consistent, each dequeue method now returns a Job instance, which is just a nice lightweight wrapper around the job tuple.

The Job class makes it easier to pass the method call info around, along with some possible meta information, like the queue the job originated from.

This fixes #7.
14 years ago
Vincent Driessen f492a5ae2b Restructure some code.
No functional change, but leave the BLPOP'ing to the Queue, as the
queues know how to pop themselves.
14 years ago
Vincent Driessen 1c9fa66bc1 Greatly simplify the setup.
Jobs don't even need to be tagged.  Any function can be put on queues.
14 years ago
Vincent Driessen 62b6b180f3 Also allow args and kwargs to enqueue() calls on Queue. 14 years ago
Vincent Driessen 196a9815d2 Add dequeue method to Queue. 14 years ago
Vincent Driessen 407f3e8b38 Add ability to put work on alternate queues. 14 years ago
Vincent Driessen 1b8da4a861 Add test for putting work on queues. 14 years ago
Vincent Driessen d721f0708b Refactor the whole Redis connection stuff to be just as easy as in RDB. 14 years ago
Vincent Driessen 518db8c24b Add better connection management.
To start using RQ, push a Redis connection up its stack, like so:

    from rq import push_connection
    push_connection(Redis())
14 years ago
Vincent Driessen f21b2af2b6 Make it an actual PyPI-managable Python package. 14 years ago