rq v0.3.0 Release Notes
-
(August 5th, 2012)
Reliability improvements
- Warm shutdown now exits immediately when Ctrl+C is pressed and worker is idle
- Worker does not leak worker registrations anymore when stopped gracefully
⏱
.enqueue()
does not consume thetimeout
kwarg anymore. Instead, to pass RQ a timeout value while enqueueing a function, use the explicit invocation instead:q.enqueue(do_something, args=(1, 2), kwargs={'a': 1}, timeout=30)
➕ Add a
@job
decorator, which can be used to do Celery-style delayed invocations:from redis import StrictRedis from rq.decorators import job # Connect to Redis redis = StrictRedis() @job('high', timeout=10, connection=redis) def some_work(x, y): return x + y
Then, in another module, you can call
some_work
:```python from foo.bar import some_work some_work.delay(2, 3) ```