mirror of https://github.com/rq/rq.git
fix docs: use delay when using @job decorator (#2088)
* fix docs: use delay to enqueue and use declared in separate file Signed-off-by: Mehdi Nassim KHODJA <18899702+naskio@users.noreply.github.com> * fix docs: use delay only Signed-off-by: Mehdi Nassim KHODJA <18899702+naskio@users.noreply.github.com> --------- Signed-off-by: Mehdi Nassim KHODJA <18899702+naskio@users.noreply.github.com>
This commit is contained in:
parent
f31afdbfdf
commit
fc4884a0f2
|
@ -439,7 +439,7 @@ from rq.decorators import job
|
|||
def add(x, y):
|
||||
return x + y
|
||||
|
||||
job = add.enqueue(3, 4)
|
||||
job = add.delay(3, 4)
|
||||
time.sleep(1)
|
||||
print(job.return_value())
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue