This repository was archived by the owner on May 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 947
fix: add CELERY_RESULT_BACKEND with default django-cache #6720
Merged
NIXKnight
merged 1 commit into
openedx-unsupported:master
from
open-craft:navin/set-celery-result-backend
Jul 13, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -89,6 +89,7 @@ CELERY_BROKER_USE_SSL: false | |
| CELERY_BROKER_VHOST: '' | ||
| CELERY_EVENT_QUEUE_TTL: null | ||
| CELERY_TIMEZONE: UTC | ||
| CELERY_RESULT_BACKEND: django-cache | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same question. |
||
| CERTIFICATE_TEMPLATE_LANGUAGES: | ||
| en: English | ||
| es: Español | ||
|
|
||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why are we overriding this here for dockers ?
Uh oh!
There was an error while loading. Please reload this page.
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.
@kaustavb12 As per my understanding, these files contain all available settings for the deployment which user can override if required.
Also it is set to the default value
django-cache. Let me know if we need to remove this.Uh oh!
There was an error while loading. Please reload this page.
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.
@navinkarkera
From what I understand, these files are meant to override some of the settings from the playbooks, in context of docker. I think this would prevent anyone from changing the value to anything else using the ansible settings.
And we have setup default value to
django-cacheanyways.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.
@kaustavb12 We can remove it, but I am trying to get a clear picture of the settings here.
I can see that we have all kinds of settings in this file, for example:
CELERY_BROKER_TRANSPORT: amqp. Does this mean we cannot override this in local docker setup as it is fixed here?Also, we have an additional file specifically for overrides called
ansible_overrides.ymlin the same folder.Uh oh!
There was an error while loading. Please reload this page.
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.
@navinkarkera Sorry for all the back and forth here, but I am trying to make sure all the changes we make here are justified.
I checked how the env settings work in the context of the devstack and you were right, these values are just initial defaults which can in-fact be overriden by both ansible and by the user as required.
I think this is how it works:
lms.ymlfile provides base meaningful defaults for the docker setup which are first copied over to the container.lms.ymlfile. Case in point, theCELERY_BROKER_TRANSPORTvariable which you pointed out. The default value inlms.ymlisamqp, but the default value in ansible isredis. The vaule for the same in devstack is alsoredis.production.pyand can in-turn be overridden bydevstack.py.In this context, setting this value here, does no harm but does not serve any purpose either, since we anyways have defaults setup in both ansible and in
production.py.Let me know what you think, or if I have missed understood the flow somewhere.
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.
@kaustavb12
No need to be sorry, in fact it helps us clear our misunderstandings about these files.
I think it would be useful to keep it in these files as a way of documenting possible configuration fields for docker.
Let me know if you feel differently.
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.
@navinkarkera
We don't maintain such defaults list for documentation purposes, for the native install, and I personally don't see too many benefits of maintaining a redundent set of defaults for docker which get overwritten by ansible anyways.
However, since we are maintaining the defaults for other variables, I am approving this for now, and leaving it at your discretion if you want to retain it.