Add the configuration necessary to run the Celery task queue.
📕Context
It is quite common for web applications to need to offload work to a background task running in order to block the regular request -> response cycle. Time consuming tasks like sending emails or processing data are places on a queue that workers can pick up and process in their own time.
The de facto standard (although not the only option) within the Python eco-system is Celery. It is robust, battle tested and extremely flexible. With that flexibility comes some things that can catch you out. As such a known good configuration for our template project is a good idea to distil what we have learnt in previous projects, and avoid those gotchas.
Whilst there is a common need it isn't universal. As such it is also an opportunity to start developing variants for our template project. The base template project should contain only that which is needed by all projects. Variants should provide addition functionality.
Tooling to allow for variants be automatically fully integrated into a project would be neat but is not a hard requirements. A starting position of simply having default configuration and documentation on how to add the variant would be sufficient at this time.
🎯Aim
Add the configuration necessary to run the Celery task queue.
📕Context
It is quite common for web applications to need to offload work to a background task running in order to block the regular request -> response cycle. Time consuming tasks like sending emails or processing data are places on a queue that workers can pick up and process in their own time.
The de facto standard (although not the only option) within the Python eco-system is Celery. It is robust, battle tested and extremely flexible. With that flexibility comes some things that can catch you out. As such a known good configuration for our template project is a good idea to distil what we have learnt in previous projects, and avoid those gotchas.
Whilst there is a common need it isn't universal. As such it is also an opportunity to start developing variants for our template project. The base template project should contain only that which is needed by all projects. Variants should provide addition functionality.
Tooling to allow for variants be automatically fully integrated into a project would be neat but is not a hard requirements. A starting position of simply having default configuration and documentation on how to add the variant would be sufficient at this time.
📝Relevant resources/doc's/people
django-celery-beat
package allows you to use Django to manage that schedule which can be handy✅Acceptance Criteria
task_runner
variant based on Celery is added🎈 Stretch Goals
django-celery-beat
in order to allow the configuration of task schedules in the Django database