-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Use new Celery, use new application pattern #3237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
agjohnson
commented
Nov 8, 2017
- Use modern celery
- Drop djcelery
- New pattern for starting celery
- Bump redis to 2.10.6 to avoid startup bug, change autodiscover call
* Use modern celery * Drop djcelery * New pattern for starting celery * Bump redis to 2.10.6 to avoid startup bug, change autodiscover call
c82a9aa
to
b0c3ad5
Compare
readthedocs/projects/tasks.py
Outdated
@@ -572,7 +569,7 @@ def update_imported_docs(version_pk): | |||
|
|||
|
|||
# Web tasks | |||
@task(queue='web') | |||
@shared_task(queue='web') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont like using shared_task
unless its a reusable app where you can not get the app.
You can import the app
from worker
then use the decorator task
something like
from readthedocs.worker import app
@app.task(queue='web')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I'll try the change.
Think we've been through this PR a few ways now. I'll get this merged |