Created
July 10, 2017 18:47
-
-
Save daviddavis/3b878e15b7a025f967699c68435fcb2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from celery import Celery, Task | |
app = Celery('tasks', backend='redis://localhost', broker='pyamqp://guest@localhost//') | |
@app.task(base=Task, acks_late=True) | |
def dummy_task(): | |
import time | |
time.sleep(600) # sleep for five minutes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Boot celery with a single worker:
Queue some tasks up:
Restart the celery worker:
Now wait 10 min. And back in the python repl:
Confirming the tasks are done: