-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#2636] stop using human-friendly names for tasks
The Celery docs make clear that the name parameter of the task decorator should be unique and that generally it functions as an identifier the task. From this we can also infer that names that change at runtime, due to gettext, are undesirable. This in fact created issue with triggering certain periodic tasks in the admin, due to a mismatch between the registered name (English) and the translated name used at runtime (Dutch). TLDR: let Celery generate the name, and directly translate the periodic task names for Beat so that the entries in the Django periodic task admin are human-readable. This is not ideal as we would like to use (lazy) gettext here, but Celery doesn't allow that, so this strikes the balance between human-readability and predictable task discovery.
- Loading branch information
1 parent
a7dd69d
commit 7e15aee
Showing
3 changed files
with
41 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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 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 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