Improved start script and additional notes for testing

drew/tilt-local-dev
Drew Bednar 2 years ago
parent 492d28c04c
commit e50d34e265

@ -17,4 +17,10 @@ MGET celery-task-meta-<UID of Task>
### Checking results in Flower
`0.0.0.0:
Use the flower dashboard at: `0.0.0.0:5557`
### Eager Task Processing
`CELERY_TASK_ALWAYS_EAGER: bool = True` will synchronously execute the celery tasks. This allows us to use things like `breakpoint()` to enter a debugger within the execution context of the task.
Since the app currently uses the fastapi application config for celery config, add `CELERY_TASK_ALWAYS_EAGER=True` to the config class if needed. You don't need to run the worker, message broker, or result backend processes to debug your code. It will process the task within

@ -4,9 +4,7 @@ set -o errexit
set -o nounset
# Use watchfiles during development
CELERY_WORKER_WATCH=${CELERY_WORKER_WATCH:-}
if [ -n "${CELERY_WORKER_WATCH}" ]; then
if [ "${CELERY_WORKER_WATCH:-false}" = true ]; then
watchfiles --filter python 'celery -A main.celery worker --loglevel=info'
else
exec python -m celery -A main.celery worker --loglevel=info

Loading…
Cancel
Save