Issue passing tasks from Flask App to Celery Worker – Flask App / Blueprints / Docker
I have a flask app with various endpoints and want to add an endpoint to a celery worker task que. It has been challenging to get the celery worker container to build due to circular imports. I tried several ways of getting the celery worker to recognise the task as shown further below, but it seems the flask app context is not passed to the celery work when it is initialized. Running it with docker compose – the web, db (postgres 13), redis, celery worker appear to build containers fine, but when sending the post request which should be sent to the celery worker no context is found. Any help or pointers would be much appreciated, thank you.
Issue passing tasks from Flask App to Celery Worker – Flask App / Blueprints / Docker
I have a flask app with various endpoints and want to add an endpoint to a celery worker task que. It has been challenging to get the celery worker container to build due to circular imports. I tried several ways of getting the celery worker to recognise the task as shown further below, but it seems the flask app context is not passed to the celery work when it is initialized. Running it with docker compose – the web, db (postgres 13), redis, celery worker appear to build containers fine, but when sending the post request which should be sent to the celery worker no context is found. Any help or pointers would be much appreciated, thank you.