Skip to content

Commit c669df2

Browse files
committed
🧑‍💻 Set default 'CELERY_QUEUE' & 'CELERY_HOSTNAME' values
1 parent 75d1541 commit c669df2

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ API_PORT="5000"
1313
DL_ZIP_WHITELISTED_DOMAINS=""
1414
DL_ZIP_TMP_PATH="./tmp"
1515

16-
CELERY_QUEUE=""
17-
CELERY_HOSTNAME=""
16+
CELERY_QUEUE="regular_process"
17+
CELERY_HOSTNAME="regular_process"
1818

1919
DISWHO_JWT_SECRET=""
2020
DISWHO_BASE_URL=""

Dockerfile.worker

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,5 @@ COPY . .
2727

2828
WORKDIR /app/src
2929

30-
# Define environment variables for hostname and queue
31-
ENV CELERY_HOSTNAME regular_process
32-
ENV CELERY_QUEUE regular_process
33-
3430
# Start the Celery worker
3531
CMD celery --app tasks worker --loglevel=info --queues=$CELERY_QUEUE --hostname=$CELERY_HOSTNAME@%h --concurrency=1

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ services:
6464
environment:
6565
POSTGRES_URL: "postgresql+psycopg2://${POSTGRES_USER}:${POSTGRES_PASS}@db:5432/dumpus"
6666
RABBITMQ_URL: "amqp://${RABBITMQ_USER}:${RABBITMQ_PASS}@broker:5672/"
67+
CELERY_HOSTNAME: "${CELERY_HOSTNAME}"
68+
CELERY_QUEUE: "${CELERY_QUEUE}"
6769

6870
api:
6971
container_name: dumpus-api

0 commit comments

Comments
 (0)