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:
Mehdi Nassim KHODJA 2024-05-12 02:27:21 +02:00 committed by GitHub
parent f31afdbfdf
commit fc4884a0f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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())
```