-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(async): Set priorities to async tasks #14195
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
base: dev
Are you sure you want to change the base?
Conversation
95561b9 to
1f8e468
Compare
Signed-off-by: kiblik <[email protected]>
Co-authored-by: valentijnscholten <[email protected]>
53a8e1e to
e882d0f
Compare
3dd4cdb to
6eb4791
Compare
Signed-off-by: kiblik <[email protected]>
6eb4791 to
161b919
Compare
|
I've converted it to draft as we can only test/merge this after 2.55.2 has been released and merged back into |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Resolved conflicts by: - Removing @dojo_async_task decorators that were removed in upstream - Keeping priority parameters from the PR - Adapting to refactored notification system (standalone task functions) - Using correct priority values (3 for notifications/jira, 1 for webhooks, 4 for cleanup tasks, 0 for status checks)
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
|
@kiblik I resolved conflicts and published the PR so we can merge it and test it with Pro. The PR does not affect Pro in the sense that Pro will keep working and the Pro celery tasks will get priority 3 which is fine. But we can/should do a Pro PR together or after this one to move some of the Pro celery tasks to other priority levels. |
This PR is adding support for priority queues. More important tasks will be processed sooner and vice versa.
The status of each queue is listed in the system settings overview:

Queue with id
0is automatically marked without a suffix (all other are using naming conventioncelery:1,celery:2...). Thanks to this fact, we are keeping backward compatibility (if there are any tasks in the queue during migration to the new version, we will still process those tasks after the upgrade).It is a bit harder to write tests for this. But I tested manually (stop worker, play around, start worker, observe logs) and it was working as expected.
The role of each queue is described in
settings.dist.py(and reflected in the overview in system settings). If task do not have a priority assigned, priority is set to the default value:3I'm open to feedback if priority of any task should be changed.