Skip to content

Commit 568817b

Browse files
committed
add redis env vars to api-server
1 parent 157bbac commit 568817b

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

services/api-server/docker/boot.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ if [ "${API_SERVER_WORKER_MODE}" = "true" ]; then
4848
--recursive \
4949
-- \
5050
celery \
51-
--app=simcore_service_api_server.celery.worker_main:app_factory \
51+
--app=simcore_service_api_server.celery.worker_main:app \
5252
worker --pool=threads \
5353
--loglevel="${API_SERVER_LOGLEVEL}" \
5454
--concurrency="${CELERY_CONCURRENCY}" \
5555
--hostname="${API_SERVER_WORKER_NAME}" \
5656
--queues="${CELERY_QUEUES:-default}"
5757
else
5858
exec celery \
59-
--app=simcore_service_api_server.celery.worker_main:app_factory \
59+
--app=simcore_service_api_server.celery.worker_main:app \
6060
worker --pool=threads \
6161
--loglevel="${API_SERVER_LOGLEVEL}" \
6262
--concurrency="${CELERY_CONCURRENCY}" \

services/api-server/src/simcore_service_api_server/celery/worker_main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def worker_init_wrapper(sender, **_kwargs):
4242
worker_shutdown.connect(on_worker_shutdown)
4343

4444
setup_worker_tasks(app)
45+
return app
4546

4647

47-
if __name__ == "__main__":
48-
app_factory()
48+
app = app_factory()

services/docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ services:
5252
RABBIT_SECURE: ${RABBIT_SECURE}
5353
RABBIT_USER: ${RABBIT_USER}
5454

55+
REDIS_HOST: ${REDIS_HOST}
56+
REDIS_PORT: ${REDIS_PORT}
57+
REDIS_SECURE: ${REDIS_SECURE}
58+
REDIS_USER: ${REDIS_USER}
59+
REDIS_PASSWORD: ${REDIS_PASSWORD}
60+
5561
STORAGE_HOST: ${STORAGE_HOST}
5662
STORAGE_PORT: ${STORAGE_PORT}
5763

0 commit comments

Comments
 (0)