From c5cc1c0baf7a36f17299e5dc311ca09d14d2d2a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s?= <7888669+moisses89@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:36:22 +0100 Subject: [PATCH] Add threading configuration for dramatiq worker (#56) --- docker/web/dramatiq/worker/run.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/web/dramatiq/worker/run.sh b/docker/web/dramatiq/worker/run.sh index 1898543..a878864 100755 --- a/docker/web/dramatiq/worker/run.sh +++ b/docker/web/dramatiq/worker/run.sh @@ -2,7 +2,10 @@ set -euo pipefail -dramatiq app.workers.tasks & # dramatiq async actors +TASK_CONCURRENCY=${TASK_CONCURRENCY:-100} + +echo "==> $(date +%H:%M:%S) ==> Running Dramatiq worker with concurrency $TASK_CONCURRENCY <==" +dramatiq app.workers.tasks --processes 1 --threads $TASK_CONCURRENCY & # dramatiq async actors periodiq -v app.workers.tasks & # cron dramatiq async actors wait \ No newline at end of file