Vincent Driessen
7fdd115e28
Merge branch 'jchia-master'
...
Conflicts:
rq/job.py
rq/queue.py
2013-09-21 13:21:35 +02:00
Vincent Driessen
01f9a98ad9
Make test more readable by using constants.
2013-09-21 13:19:12 +02:00
Vincent Driessen
bb3dc5b0b2
Terminology change: waitlist -> dependents.
2013-09-21 10:46:03 +02:00
Joshua Chia
b89d6c8990
Set timeout at Job creation instead of during enqueueing; made Queue.enqueue_call respect `timeout` when `after` is specified
2013-09-19 01:22:13 -04: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
Mark Tozzi
0713ad03c2
Empty now deletes all jobs in the queue
2013-09-05 10:06:43 -04:00
Vincent Driessen
1fed0e0ed5
PEP8ify.
2013-09-05 00:24:14 +02:00
Vincent Driessen
d92022bb83
Record new behaviour of Queue.all() explicitly in a test.
2013-09-05 00:24:06 +02:00
Vincent Driessen
13b8d03c59
Remove misleading test.
2013-09-05 00:17:15 +02:00
Rob Harrigan
02c5d902ec
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
tests/test_queue.py
2013-09-03 20:23:15 -04:00
Rob Harrigan
5e4d5f642e
Only save queue to set on enqueue.
...
Validate queue key still exists when all() is called
2013-09-03 13:40:53 -04: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
Rob Harrigan
c08b96e027
Use a redis set to store queue names, instead of relying on the redis "keys" method,
...
which does not perform well on large databases.
2013-08-28 13:07:06 -04: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
Vincent Driessen
670a4e2a4e
Python 3 chokes on this one. Whatever man.
2013-08-05 15:12:17 +03:00
Alex Morega
a3b5ce5e46
accomodate py3 imports and builtins
2013-08-05 14:24:06 +03:00
Wojciech Bederski
f9897ea920
register_sentry breaks failed queue when func cannot be imported
2013-07-30 18:44:35 +07: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
Selwin Ong
18ff57ef35
Avoid race conditions when enqueueing job with dependency.
2013-04-28 11:11:36 +07:00
Vincent Driessen
7ea02d4029
Add explicit classmethod test.
2013-04-19 21:21:53 +02: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
6550f86646
Don't enqueue waitlisted jobs on failed execution.
2013-04-18 22:18:56 +07: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
c987569650
Safe fetching a deleted job removes the deleted job from queue.
2013-02-16 18:50:37 +07:00
Vincent Driessen
640195d5e4
Merge branch 'master' into yaniv-aknin-worker_ttl
2013-02-15 08:08:32 +01:00
Selwin Ong
e5fa82aa5d
Merge branch 'master' of github.com:selwin/rq
2013-02-13 11:51:15 +07:00
Selwin Ong
05d744c9af
Requeuing a job should set its status back to Queued.
2013-02-13 11:50:40 +07:00
Vincent Driessen
54254f2271
Patch the connection instances.
...
This patches the connection object (which is either a StrictRedis
instance or a Redis instance), to have alternative class methods that
behave exactly like their StrictRedis counterparts, no matter whether
which type the object is. Only the ambiguous methods are patched. The
exhaustive list:
- _zadd (fixes argument order)
- _lrem (fixes argument order)
- _setex (fixes argument order)
- _pipeline (always returns a StrictPipeline)
- _ttl (fixes return value)
- _pttl (fixes return value)
This makes it possible to call the methods reliably without polluting
the RQ code any further.
2013-02-06 22:54:20 +01:00
Yaniv Aknin
4925b09aa5
Set worker ttl and maintain it when idle/taking/finishing jobs
...
This change could use far better test coverage, but I'm not sure how to
test it without refactoring more of the code than I think is reasonable
in the scope of this work.
2013-01-26 22:58:51 +02:00
Yaniv Aknin
74c2351232
Refactor dequeue_any to accept arbitrary timeouts
...
The 'blocking' parameter was replaced with a 'timeout' parameter.
The timeout parameter is interpreted thus:
0 - no timeout (block forever, equivalent to blocking=True)
None - non-blocking (return value or None immediately, equivalent to
blocking=False)
<integer> - maximum seconds to block
Upon timing out, a dequeue operation will raise DequeueTimeout.
2013-01-26 18:41:10 +02:00
Vincent Driessen
06b48c2026
Use unittest2 for Python 2.6.
2013-01-23 22:43:30 +01:00
Vincent Driessen
d1c2b3b78d
Merge branch 'selwin-remove-logbook'
...
Conflicts:
rq/utils.py
rq/worker.py
setup.cfg
setup.py
2013-01-18 15:47:21 +01: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
Ulrich Petri
43038d3150
Added tests for config file loading
2012-11-24 14:53:22 +01:00
Vincent Driessen
5e59c6e28e
Rename the const.
2012-09-14 09:56:10 +02:00
Scott Burns
538bbb1b55
Decorator accepts result_ttl argument
2012-09-13 11:07:52 -05: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