Questions tagged celery

Explore the latest questions and answers asked by our top developers.

How to separate Celery and Django Docker containers

I would like to separate my Celery Docker container from my backend (Django) Docker container. I would like the Celery container to be built without relying on the backend container. Currently, all the tutorials I am finding online are set up so that the Celery image is built using the Backend container’s context like such: […]

By David Alford
Categorised as celery, django, docker, docker-compose, python Tagged , , , ,

Django : Celery configuration with Rabbit MQ inside docker

I’ve already got a rabbitmq container that launches with my django vm. This is the docker-compose.yml file: version: "3.8" services: web: build: ./src ports: – "${PORT}:${PORT}" depends_on: – message tty: true stdin_open: true container_name: ${COMPOSE_PROJECT_NAME}_app expose: – ${PORT} links: – message env_file: – .env restart: unless-stopped volumes: – ./src:/code message: container_name: ${COMPOSE_PROJECT_NAME}_broker image: rabbitmq:3.9.12-management ports: […]

By Chuck h5
Categorised as celery, django, docker, docker-compose, python Tagged , , , ,

Celery task doesn’t work when run inside docker container

I recently installed celery and redis and it works fine. Then I tried the same method to install celery and redis inside the docker container(selenium/standalone-chrome), it doesn’t execute the task. The image shows as below : enter image description here And it doesn’t show the "[INFO/MainProcess] Connected to redis://….", so I don’t know celery connect […]

By WeiSwo
Categorised as celery, docker, redis Tagged , ,

Permissions error trying to log to file in Docker

I am working on a legacy Docker application that is using Celery workers. I’m trying to log to a file using the link below as a guide. The code shown below gives the error shown below. How do I fix this permission error so I can log to a file from a Celery worker running […]

By John
Categorised as celery, docker Tagged ,

Are the files in the cli for Docker celery worker the same, if not what’s a good way to create a common file for the threads to write to?

I have a legacy Docker application I’m working with that uses multiple Celery workers. There is a long running process I need to track. I’m able to write data to a file that is visible from the CLI interface of the worker thread: I’m writing to the file like this: def log(msg): now = […]

By John
Categorised as celery, docker Tagged ,

Celery/Kombu worker under Docker worker won’t pick up messages from SQS

I’m enqueuing jobs to AWS SQS from a local env and I’m able to consume them successfully from the same local env but when I try to pack the worker into a docker instance and run it, it will not pick up the jobs. As far as I can tell, it is hitting the right […]

By Michael Dausmann
Categorised as celery, docker, kombu Tagged , ,

FileNotFoundError: [Errno 2] No such file or directory: ‘auto-restart’

Tried use watchdog to auto-restart celery worker/beat in docker container when code changed, and get error: # watchmedo auto-restart -d . -R — celery -A main_app_name beat -l info Traceback (most recent call last): File "/usr/local/bin/watchmedo", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.9/site-packages/watchdog/", line 641, in main args.func(args) File "/usr/local/lib/python3.9/site-packages/watchdog/", line 625, in auto_restart handler.start() […]

By BiggestSmile
Categorised as celery, django, docker, watchdog Tagged , , ,

Celery Async Issue in Django’s Docker Container

I have deployed micro services on docker containers using celery for queue management. Problem is that when I call sync operation it can access database container but async operation gives us this error HTTPConnectionPool(host=’database’, port=83): Max retries exceeded with url: Can anybody tell me the root cause of this behavior? why the same API is […]

Celery + FastAPI on docker, the app container does not sync with Celery thus I can’t use it

So I’m building a webapp using FastAPI. I use Celery to run some background tasks. My code works fine on my local development machine, but when I try to dockerize it, it seems the FastAPI app running on a container, can’t sync with celery. For instance I have 4 containers: If I start the webapp […]

By Andr Costa
Categorised as celery, docker, fastapi Tagged , ,

Django Docker Celery – Cannot assign requested address Is the server running on host

I am trying to run celery within a docker with django and postgres. My is as follows DB_HOST=db DB_NAME=app DB_USER=postgres DB_PASS=supersecretpassword DB_ENGINE=django.db.backends.postgresql POSTGRES_DB=app POSTGRES_USER=postgres POSTGRES_PASSWORD=supersecretpassword My is as follows DATABASES = { ‘default’: { ‘ENGINE’: os.environ.get(‘DB_ENGINE’), ‘HOST’: os.environ.get(‘DB_HOST’), ‘NAME’: os.environ.get(‘DB_NAME’), ‘USER’: os.environ.get(‘DB_USER’), ‘PASSWORD’: os.environ.get(‘DB_PASS’), } } My docker-compose is as follows version: "3.9" […]

By Joseph Adam
Categorised as celery, django, docker, python Tagged , , ,
1 2 3 13

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us