Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,7 @@ services:
hostname: "sto-worker-{{.Node.Hostname}}-{{.Task.Slot}}"
environment:
<<: *storage_environment
STORAGE_WORKER_NAME: "sto-worker-{{.Node.Hostname}}-{{.Task.Slot}}-{{.Task.ID}}"
STORAGE_WORKER_MODE: "true"
CELERY_CONCURRENCY: 100
networks: *storage_networks
Expand All @@ -1259,6 +1260,7 @@ services:
hostname: "sto-worker-cpu-bound-{{.Node.Hostname}}-{{.Task.Slot}}"
environment:
<<: *storage_environment
STORAGE_WORKER_NAME: "sto-worker-cpu-bound-{{.Node.Hostname}}-{{.Task.Slot}}-{{.Task.ID}}"
STORAGE_WORKER_MODE: "true"
CELERY_CONCURRENCY: 1
CELERY_QUEUES: "cpu_bound"
Expand Down
2 changes: 2 additions & 0 deletions services/storage/docker/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ if [ "${STORAGE_WORKER_MODE}" = "true" ]; then
worker --pool=threads \
--loglevel="${SERVER_LOG_LEVEL}" \
--concurrency="${CELERY_CONCURRENCY}" \
--hostname="${STORAGE_WORKER_NAME}" \
--queues="${CELERY_QUEUES:-default}"
else
exec celery \
--app=simcore_service_storage.modules.celery.worker_main:app \
worker --pool=threads \
--loglevel="${SERVER_LOG_LEVEL}" \
--concurrency="${CELERY_CONCURRENCY}" \
--hostname="${STORAGE_WORKER_NAME}" \
--queues="${CELERY_QUEUES:-default}"
fi
else
Expand Down
4 changes: 2 additions & 2 deletions services/storage/docker/healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


import os
import socket
import subprocess
import sys
from urllib.request import urlopen
Expand All @@ -37,6 +36,7 @@

app_settings = ApplicationSettings.create_from_envs()


def _is_celery_worker_healthy():
assert app_settings.STORAGE_CELERY
broker_url = app_settings.STORAGE_CELERY.CELERY_RABBIT_BROKER.dsn
Expand All @@ -50,7 +50,7 @@ def _is_celery_worker_healthy():
"inspect",
"ping",
"--destination",
"celery@" + socket.gethostname(),
"celery@" + os.getenv("STORAGE_WORKER_NAME", "worker"),
],
capture_output=True,
text=True,
Expand Down
Loading