1684 Commits (3be814c6d878c76a459145ee6f5f50b50543e6e9)
 

Author SHA1 Message Date
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
Vincent Driessen f47398a754 Ditch false code size claim. 13 years ago
Vincent Driessen fb587297f6 Requeue should not error when called on a deleted job ID. 13 years ago
Vincent Driessen 7ef3b5ade8 Cleanup job hashes for jobs without result, too. 13 years ago
Vincent Driessen f07d28db86 Organize test fixtures into a separate file. 13 years ago
Vincent Driessen 5717a0ba15 Rename Job.for_call() -> Job.create().
This fixes #34.
13 years ago
Vincent Driessen 7e0b843d06 Implement requeue() method on FailedQueue. 13 years ago
Vincent Driessen 8e85c7eee3 Put Job directly in the top-level `rq` module. 13 years ago
Vincent Driessen 240d2d941d Extracted method.
This makes the act of moving failed jobs to the failed queue
responsibility of the FailedQueue itself, not of the Worker.

This fixes #32.
13 years ago
Vincent Driessen d64ad225eb Make FailedQueue a full subclass of Queue.
We will add special methods on it in the future.

This fixes #33.
13 years ago
Vincent Driessen 6f05e03293 Clean up some of the dummy jobs used for testing.
Also, add a random_failure test.
13 years ago
Vincent Driessen f62e295454 Ignore autoenv file. 13 years ago
Vincent Driessen 06ce9622ea Add compact() method on Queues, to remove dead messages. 13 years ago
Vincent Driessen 80a615a61c Flake8 style fixes. 13 years ago
Vincent Driessen 70cbf00890 Refactor out an exists() and a for_key() method. 13 years ago
Vincent Driessen c49e564d3c Don't break the API when jobs get deleted. 13 years ago
Vincent Driessen bd08f24f15 Cosmetic changes to the command line output. 13 years ago
Vincent Driessen e4055ca42f Allow queues to be emptied. 13 years ago
Vincent Driessen 9e33e1a08f Implement a cancel() method on jobs.
This fixes #29.
13 years ago
Vincent Driessen 53f55ba986 Flake8 style fixes in the test suite. 13 years ago
Vincent Driessen 0a0d9d1ceb Flake8 style fixes. 13 years ago
Vincent Driessen 1a8b80604d Minor refactoring to make the to-failed queue code a bit more readable. 13 years ago
Vincent Driessen 11c7dbb376 Consistently renamed "failure" -> "failed" queue.
Fixes #28.
13 years ago
Vincent Driessen 9f5b1545b6 Fix: store the job result in the correct key.
And expire job hash in Redis after 500 seconds (by default).

Fixes #27.
13 years ago
Vincent Driessen 7bda1ca969 Encapsulate the result property (it should not directly be set). 13 years ago
Vincent Driessen 6266f68310 Style fixes (flake8). 13 years ago
Vincent Driessen 10c48e1dbd Merge branch 'use-cpickle' 13 years ago
Vincent Driessen 8da204f74a Always use cPickle, never 'regular' pickle.
This fixes #18.
13 years ago
Vincent Driessen 9318825429 Abstract away from the concrete pickle implementation.
Choose cPickle, if available, for best performance.
13 years ago
Vincent Driessen c4553f2a22 Merge branch 'rewrite-data-model' 13 years ago
Vincent Driessen abc66171eb Simplify the count_words_at_url example.
The long implementation derived attention a bit from the actual point of
enqueuing here.
13 years ago
Vincent Driessen 39f106cdb3 Have the test suite find an empty Redis database.
Since the test suite `flushdb()`'s after running each test, we should
make sure the database is empty before we even start running tests.
This patch will make sure to never destroy any local production data
inside the running Redis instance.

This fixes #25.
13 years ago
Vincent Driessen 90a458ca8e Add more colorful terminal output.
For better visual parsability.
13 years ago
Vincent Driessen 63ef198fd6 Improve work generator. 13 years ago
Vincent Driessen 791f8169f5 Remove dead code. 13 years ago
Vincent Driessen e05acfedce Fix putting jobs on the failure queue when they fail. 13 years ago
Vincent Driessen 7c903e45ef Simplify the persistence of jobs.
Fixes #23 and #24.
13 years ago
Vincent Driessen bffe6cbbde Encapsulate internal function call representation.
This means it's not allowed anymore to directly set func, args, and
kwargs.  Instead, use the for_call() constructor.
13 years ago