ackama / django-template

A template for initiating new Django projects
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

Add a Task Runner Variant #27

Open a-musing-moose opened 9 months ago

a-musing-moose commented 9 months ago

🎯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

✅Acceptance Criteria

🎈 Stretch Goals