On this page
article
Celery Background Task
Offload work to a background worker.
Category: celery
Problem
Offload work to a background worker.
Solution
@app.task
def send_email(to, subject):
...
Notes
- Adapt variable names and paths to your project
- Add error handling for production use
- See related chapters in the Learning Path