Selwin Ong
b997fb45bf
Removed unnecessary lines from test_job.py.
2013-09-23 17:35:59 +07:00
Selwin Ong
8aa5771646
job.cancel() now deletes dependents_key
2013-09-23 17:34:43 +07:00
Vincent Driessen
bb3dc5b0b2
Terminology change: waitlist -> dependents.
2013-09-21 10:46:03 +02:00
Selwin Ong
15c4b562ba
Reverse dependency mapping should be a set instead of a list.
2013-09-17 20:10:30 +07:00
Selwin Ong
93e5e552b7
Replaced "after" kwarg with "depends_on".
2013-09-17 19:49:17 +07:00
Selwin Ong
fd44ad39d4
Python 3 fixes for job dependency stuff.
2013-09-03 08:03:50 +07:00
Selwin Ong
fcfe55fe13
Merge branch 'master' into job_dependency
...
Conflicts:
rq/job.py
rq/queue.py
2013-09-03 07:46:19 +07:00
Vincent Driessen
1274b09115
Use constants in tests, instead of calling more functions.
2013-08-26 10:19:46 +02:00
Vincent Driessen
90fcb6c9d0
PEP8ify.
2013-08-26 10:17:17 +02:00
H. İbrahim Güngör
10bda9684d
Pass description parameter to job constructor in order to distinguish job names in queue.jobs or in rq-dashboard. Add related test case.
2013-08-21 17:51:14 +03:00
Alex Morega
328e7611d3
use utf-8 instead of ascii
2013-08-07 00:10:54 +03:00
Alex Morega
8d61d3bf26
port string handling to py3
...
Redis uses byte values for everything. We save queue names and job
IDs as unicode. So we need to convert every time we get data from redis.
2013-08-05 15:17:07 +03:00
Alex Morega
a3b5ce5e46
accomodate py3 imports and builtins
2013-08-05 14:24:06 +03:00
Selwin Ong
e7e8579888
Merge branch 'master' of git://github.com/nvie/rq into job_dependency
...
Conflicts:
rq/queue.py
2013-04-28 11:29:44 +07:00
Selwin Ong
2e826e2b1f
Internally renamed the term "parent" to "dependency".
2013-04-28 11:27:50 +07:00
Selwin Ong
0dfb041383
Simplify enqueue_waitlist by using lpop.
2013-04-28 11:20:39 +07:00
Vincent Driessen
a5dff6659c
Replace the Calculator fixture by a Number fixture.
...
This makes the tests a little more realistic, since I want to add a test
for class methods.
2013-04-19 21:18:25 +02:00
Selwin Ong
eadc7db29f
First stab at writing implementing job dependency.
2013-04-18 22:11:43 +07:00
Selwin Ong
85e9014296
Moved some logic from worker.perform_job() to job.cleanup().
2013-02-23 14:23:23 +07:00
Selwin Ong
f498de57b6
Always call job.save even on synchronous queues so get_current_job doesn't fail
2012-11-25 13:37:12 +01:00
Vincent Driessen
10237ddcb4
Merge branch 'job-access-within-job'
...
Conflicts:
CHANGES.md
rq/job.py
2012-11-25 13:36:09 +01:00
Vincent Driessen
8cb6a21670
Only store custom properties when they're written to the meta dict.
2012-09-03 11:54:40 +02:00
Vincent Driessen
5e80aa27eb
Fix comment.
2012-09-02 23:10:35 +02:00
Vincent Driessen
95d3aed98e
Store the job ID on the internal stack.
...
It does so instead of the instance itself. Still returns the job---the
interface hasn't changed.
2012-09-02 23:00:13 +02:00
Vincent Driessen
372de4b45a
Implement the get_current_job() function.
...
This fixes #125 .
2012-09-02 22:38:46 +02:00
Vincent Driessen
83369f3b9b
Prefer `result` over `return_value`.
...
`return_value` still is available as a backward-compatible accessor.
This fixes #116 .
2012-08-23 09:27:27 +02:00
Selwin Ong
a5e6765990
Added "result_ttl" property on jobs that determines how long job results are persisted in Redis.
2012-08-07 14:34:51 +07:00
Vincent Driessen
f6e67431d7
Refactor the .enqueue() API to not gobble the timeout kwargs.
...
This fixes #98 .
2012-07-23 11:39:22 +02:00
Vincent Driessen
3a8f30a53e
Add test.
2012-07-18 14:13:13 +02:00
Vincent Driessen
604fce99a1
Merge with master.
2012-07-17 22:37:03 +02:00
Selwin Ong
1fb0a1bfac
Modified ``Job`` ``save`` and ``refresh`` methods to support persisting
...
additional ``Job`` attributes into Redis.
2012-07-17 20:23:01 +07:00
Omar Khan
03bd49511d
Allow instance methods to be enqueued
...
Only works for picklable instances
2012-07-17 11:48:41 +01:00
Vincent Driessen
b45770cd3c
Fix unit test expressions.
2012-05-18 08:35:02 +02:00
Vincent Driessen
98ea29b15a
Don't expose the Job class at the top-level.
...
This partially fixes #37 .
2012-03-21 15:05:58 +01:00
Vincent Driessen
2b6101d110
Move job from Worker to Job test suite.
2012-03-21 13:18:01 +01:00
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.
2012-03-21 13:09:52 +01:00
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.
2012-02-22 18:01:14 +01:00
Vincent Driessen
f07d28db86
Organize test fixtures into a separate file.
2012-02-15 21:55:06 +01:00
Vincent Driessen
5717a0ba15
Rename Job.for_call() -> Job.create().
...
This fixes #34 .
2012-02-15 17:01:10 +01:00
Vincent Driessen
7e0b843d06
Implement requeue() method on FailedQueue.
2012-02-15 16:59:27 +01:00
Vincent Driessen
8e85c7eee3
Put Job directly in the top-level `rq` module.
2012-02-15 15:54:02 +01:00
Vincent Driessen
53f55ba986
Flake8 style fixes in the test suite.
2012-02-13 17:32:16 +01:00
Vincent Driessen
7bda1ca969
Encapsulate the result property (it should not directly be set).
2012-02-13 16:43:27 +01:00
Vincent Driessen
8da204f74a
Always use cPickle, never 'regular' pickle.
...
This fixes #18 .
2012-02-13 13:59:24 +01:00
Vincent Driessen
9318825429
Abstract away from the concrete pickle implementation.
...
Choose cPickle, if available, for best performance.
2012-02-13 13:59:24 +01:00
Vincent Driessen
7c903e45ef
Simplify the persistence of jobs.
...
Fixes #23 and #24 .
2012-02-10 17:18:51 +01:00
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.
2012-02-08 14:18:17 +01:00
Vincent Driessen
65105b44c3
CHECKPOINT: Initial part of the big refactor.
2012-02-08 00:40:43 +01:00
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 .
2012-01-30 16:52:28 +01:00
Vincent Driessen
0503eb2829
Clarified responsibility of the Job class.
...
The Job itself has nothing to do with queueing and dequeueing, so the
DequeueError wasn't appropriate here, either.
2012-01-28 09:00:02 +01:00