fix: get CELERY_RESULT_BACKEND from ENV_TOKENS#30244
fix: get CELERY_RESULT_BACKEND from ENV_TOKENS#30244giovannicimolin merged 1 commit intoopenedx:masterfrom
Conversation
|
Thanks for the pull request, @navinkarkera! I've created OSPR-6618 to keep track of it in JIRA, where we prioritize reviews. Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
|
@navinkarkera Thank you for your contribution. Is this ready for our review? |
|
Hi @natabene ! This is not ready for your review yet. I'll ping you here once ready. |
kaustavb12
left a comment
There was a problem hiding this comment.
👍
Looks good to me
- I tested this: Tested in the PR sandbox
- I read through the code
|
Thank you for your patience here. This PR is now ready for your review. |
6ac2e30 to
e097702
Compare
e097702 to
4e74b16
Compare
giovannicimolin
left a comment
There was a problem hiding this comment.
👍
- I tested this:
- Checked that the default value retains previous behavior.
- Checked that changing the variable allows configuring a different result backend for celery (verified it's working on a client instance)
- I read through the code
- I checked for accessibility issues
- Includes documentation: comment on code.
@navinkarkera Looks good 👍
I'll wait two days before merging this to see if anyone raises concerns.
CC @natabene
|
@navinkarkera 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
|
EdX Release Notice: This PR may have caused e2e tests to fail on Stage. If you're a member of the edX org, please visit #warroom on Slack to help diagnose the cause of these failures. Otherwise, it is the reviewer's responsibility. E2E tests have failed. https://gocd.tools.edx.org/go/tab/pipeline/history/deploy_to_stage |
|
EdX Release Notice: This PR has been deployed to the production environment. |
1 similar comment
|
EdX Release Notice: This PR has been deployed to the production environment. |
<!--
🌰🌰
🌰🌰🌰🌰 🌰 Note: the Nutmeg master branch has been created. Please consider whether your change
🌰🌰🌰🌰 should also be applied to Nutmeg. If so, make another pull request against the
🌰🌰🌰🌰 open-release/nutmeg.master branch, or ping @nedbat for help or questions.
🌰🌰
Please give your pull request a short but descriptive title.
Use conventional commits to separate and summarize commits logically:
https://open-edx-proposals.readthedocs.io/en/latest/oep-0051-bp-conventional-commits.html
Use this template as a guide. Omit sections that don't apply. You may link to information rather than copy it.
More details about the template are at openedx/openedx-proposals#180
(link will be updated when that document merges)
-->
## Description
**Cherry pick of #30244
At Opencraft, we want to run multiple instances of celery workers in separate servers. The celery workers need to be able to share task results. Currently, the `CELERY_RESULT_BACKEND` is hard coded to use `django-cache`.
So this PR allows to setup `CELERY_RESULT_BACKEND` via configuration.
To use django ORM as celery backend, one can set `CELERY_RESULT_BACKEND` to `django-db` as described in [docs](https://docs.celeryq.dev/en/stable/django/first-steps-with-django.html#django-celery-results-using-the-django-orm-cache-as-a-result-backend).
## Supporting information
- Task: https://tasks.opencraft.com/browse/BB-6077
## Deadline
"None"
Description
At Opencraft, we want to run multiple instances of celery workers in separate servers. The celery workers need to be able to share task results. Currently, the
CELERY_RESULT_BACKENDis hard coded to usedjango-cache.So this PR allows to setup
CELERY_RESULT_BACKENDvia configuration.To use django ORM as celery backend, one can set
CELERY_RESULT_BACKENDtodjango-dbas described in docs.Supporting information
Deadline
"None"