♻️ Send account creation email asynchronously via BackgroundTasks
Making it a background task improves responsiveness and user experience. For future If you need to perform heavy background computation and you don't necessarily need it to be run by the same process (for example, you don't need to share memory, variables, etc), you might benefit from using other bigger tools like Celery According to the FastAPI docs : https://fastapi.tiangolo.com/tutorial/background-tasks/?h=#technical-details
@alejsdev Hi, is there any kind of feedback? It's been a long time...
Hi @YuriiMotov , This is my first-ever open-source contribution. I’d like to propose making background task support optional:
- Introduce a boolean
USE_CELERYinconfig.py. - If
USE_CELERY=True, the developer can start Celery + RabbitMQ via a Docker Compose profile, for example:
docker-compose --profile celery up - If
USE_CELERY=False, only the backend runs:
docker-compose up
is this approach acceptable?