Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Task Runner Variant #27

Open
a-musing-moose opened this issue Feb 5, 2024 · 0 comments
Open

Add a Task Runner Variant #27

a-musing-moose opened this issue Feb 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@a-musing-moose
Copy link
Contributor

a-musing-moose commented Feb 5, 2024

🎯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

  • The concept of a Variant is added to the template project
  • A new task_runner variant based on Celery is added
  • The variant provides:
    • A known good set of configuration to ensure common gotchas are avoided
    • Sufficient documentation to explain the configuration choices and to guide a developer to add it an instance of the template project
    • Configuration to use Redis as the broker
    • Provides the ability to run a worker locally so that the development environment matches as closely as possible the production environment

🎈 Stretch Goals

  • Add django-celery-beat in order to allow the configuration of task schedules in the Django database
  • Add some tooling around the variants that allow the automation of adding the variant to an existing project.
@a-musing-moose a-musing-moose added the enhancement New feature or request label Feb 5, 2024
@a-musing-moose a-musing-moose changed the title Add a Celery _Variant_ Add a Celery Variant Feb 6, 2024
@a-musing-moose a-musing-moose changed the title Add a Celery Variant Add a Task Runner Variant Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants