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
Change priority to use zpriority and change default priority to +inf #5
Conversation
9abe187
to
b51dfbf
Compare
@@ -3,7 +3,7 @@ | |||
setup( |
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.
You need to update the download_url
too
README.md
Outdated
|
||
## Using with celery tasks - zpriority | ||
|
||
task.apply_async(zpriority=10) |
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.
That's pretty crazy that you can straight pass through celery a new option like this.
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.
Aside from one comment about version, this looks good. A bit uncomfortable about relying on a hidden feature in celery where message properties can be set.
@yorinasub17 I can see that. But I think using "priority" is worse since the ranges of priority differ and the meaning of priorities differ (in normal priority, larger means high priority). In this case, even if we switch backends, then the worst thing that happens is that we switch back to FIFO. |
@sbarman agreed that this is the better of the two evils. |
b51dfbf
to
d73e601
Compare
d73e601
to
5960e73
Compare
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.
Looks good overall. Did you tag this commit with the version? We will also need to push out a release to PyPi
README.md
Outdated
|
||
zpriority is used to avoid confusion with other celery priority implementations | ||
|
||
Note - tasks created using this backend will have the lowest priority, +inf |
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 would add "tasks created without a zpriority" just to clarify its the default
For @sbarman
cc - @yorinasub17
Changes:
zpriority
to avoid confusion with other celery priority implementations