Open
Conversation
jennifer-richards
requested changes
Jan 29, 2026
Member
jennifer-richards
left a comment
There was a problem hiding this comment.
Mentioned in chat, but so it doesn't get lost... this will need additional work.
- This refactor does not work with Celery's
autodiscover_tasks()mechanism. In a Django project this has each worker execute the equivalent ofimport <app>.tasksfor every<app>in the project. That import is what triggers the task decorators to add their tasks to the task registry and, sincetasks.__init__is empty, nothing happens. It so happens that right now the imports inapi.pyare being executed in the workers. That makes things work for now, but it's fragile and we really don't want to count on that - it will likely lead to future hard to find issues. - Less of a technical issue, but I think we should think about the granularity of submodules. One task per submodule seems too fine. With the three tasks we have now, I'd include the metadata tasks in the publish file as they're logically part of that process.
Given the technical issue and small number of tasks now, I think we should table this refactor for the moment and address it in later work. We should avoid letting tasks.py turn into a dumping ground for unrelated code, though.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.