Selwin Ong
c987569650
Safe fetching a deleted job removes the deleted job from queue.
12 years ago
Vincent Driessen
640195d5e4
Merge branch 'master' into yaniv-aknin-worker_ttl
12 years ago
Selwin Ong
e5fa82aa5d
Merge branch 'master' of github.com:selwin/rq
12 years ago
Selwin Ong
05d744c9af
Requeuing a job should set its status back to Queued.
12 years ago
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.
12 years ago
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.
12 years ago
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.
12 years ago
Vincent Driessen
06b48c2026
Use unittest2 for Python 2.6.
12 years ago
Vincent Driessen
d1c2b3b78d
Merge branch 'selwin-remove-logbook'
...
Conflicts:
rq/utils.py
rq/worker.py
setup.cfg
setup.py
12 years ago
Selwin Ong
f498de57b6
Always call job.save even on synchronous queues so get_current_job doesn't fail
12 years ago
Vincent Driessen
10237ddcb4
Merge branch 'job-access-within-job'
...
Conflicts:
CHANGES.md
rq/job.py
12 years ago
Ulrich Petri
43038d3150
Added tests for config file loading
12 years ago
Vincent Driessen
5e59c6e28e
Rename the const.
12 years ago
Scott Burns
538bbb1b55
Decorator accepts result_ttl argument
12 years ago
Vincent Driessen
8cb6a21670
Only store custom properties when they're written to the meta dict.
12 years ago
Vincent Driessen
5e80aa27eb
Fix comment.
12 years ago
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.
12 years ago
Vincent Driessen
372de4b45a
Implement the get_current_job() function.
...
This fixes #125 .
12 years ago
Vincent Driessen
879a87d158
Remove logbook and replace it with logging.
...
This reverts commit 1ab8c19696
and
reintroduces all changes made by @dstufft.
Still, it needs more patches to reeanble the default log-to-console
behaviour. See #121 .
12 years ago
Vincent Driessen
1ab8c19696
Revert "Remove logbook and replace it with logging".
...
This reverts the commit range f367c38..978ba2d.
Issue #121 is currently blocking the 0.3.1 release.
12 years ago
Vincent Driessen
781f3e0460
Add test for custom exc handling.
12 years ago
Vincent Driessen
6b0ebe9ceb
Remove is_done property.
...
It is too similar to is_finished.
13 years ago
Vincent Driessen
9549b34d60
Add convenience accessor properties for status.
13 years ago
Vincent Driessen
4224304291
I like this implementation of an 'enum' better.
13 years ago
Selwin Ong
442b389b97
Job returning None as result are now persisted correctly.
...
Job status can now be checked via ``status`` property which should
return either "queued", "finished" or "failed".
13 years ago
Vincent Driessen
f06ef9c975
Merge branch 'selwin-async-2'
...
This fixes #114 .
13 years ago
Vincent Driessen
83369f3b9b
Prefer `result` over `return_value`.
...
`return_value` still is available as a backward-compatible accessor.
This fixes #116 .
13 years ago
Selwin Ong
06d75630e0
Execute job immediately if Queue(async=False)
13 years ago
Donald Stufft
a08c983efc
Fix tests to use logging
13 years ago
Vincent Driessen
5fcedbcdad
Change assertEqual to assertGreaterThan, to make the test a little less
...
brittle (on slow machines).
13 years ago
Selwin Ong
a5e6765990
Added "result_ttl" property on jobs that determines how long job results are persisted in Redis.
13 years ago
Selwin Ong
a4f1de358f
Raise a StopException when Control+C is pressed.
13 years ago
Vincent Driessen
d697ddb93a
Resolve connections early.
...
Fixes #101 .
13 years ago
Vincent Driessen
c7225ba257
Minor bug in test case.
13 years ago
Vincent Driessen
35dedf3db4
Make test descriptions show up in short (oneliner) mode, as ./run_tests does.
13 years ago
Vincent Driessen
ea19bdc910
Merge branch 'new-enqueue' into selwin-decorator
13 years ago
Selwin Ong
8c3292d35b
Make "queue" argument in job decorator required.
...
job decorator now uses Queue's "enqueue_call" method.
13 years ago
Vincent Driessen
d66939ff4a
Don't use the (internal) .enqueue_call() in unit tests.
13 years ago
Selwin Ong
ae97f862dc
Merge branch 'master' into decorator
13 years ago
Vincent Driessen
e6bb7de8c0
Get rid of the ambiguity when passing the timeout argument to .enqueue() calls.
13 years ago
Vincent Driessen
f6e67431d7
Refactor the .enqueue() API to not gobble the timeout kwargs.
...
This fixes #98 .
13 years ago
Selwin Ong
bdc1af28d1
Added a job decorator.
13 years ago
Vincent Driessen
3a8f30a53e
Add test.
13 years ago
Vincent Driessen
604fce99a1
Merge with master.
13 years ago
Selwin Ong
1fb0a1bfac
Modified ``Job`` ``save`` and ``refresh`` methods to support persisting
...
additional ``Job`` attributes into Redis.
13 years ago
Vincent Driessen
cfbbc3d0ea
Merge remote-tracking branch 'omarkhan/instance_methods'
13 years ago
Omar Khan
03bd49511d
Allow instance methods to be enqueued
...
Only works for picklable instances
13 years ago
Goran Peretin
34d161eb11
requeueing preserves job timeout
13 years ago
Goran Peretin
317a58a3b5
quarantine preserves job timeout
13 years ago
Vincent Driessen
f5951900c8
Make unit tests compatible with Python < 2.7.
13 years ago