mirror of https://github.com/rq/rq.git
Add changes to change log.
This commit is contained in:
parent
4057ae768b
commit
7e1f837174
10
CHANGES.md
10
CHANGES.md
|
@ -10,12 +10,20 @@
|
|||
- Add a `@job` decorator, which can be used to do Celery-style delayed
|
||||
invocations:
|
||||
|
||||
from redis import Redis
|
||||
from rq.decorators import job
|
||||
|
||||
@job('high', timeout=10)
|
||||
# Connect to Redis
|
||||
redis = Redis()
|
||||
|
||||
@job('high', timeout=10, connection=redis)
|
||||
def some_work(x, y):
|
||||
return x + y
|
||||
|
||||
Then, in another module, you can call `some_work`:
|
||||
|
||||
from foo.bar import some_work
|
||||
|
||||
some_work.delay(2, 3)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue