Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Make celery worker prefetch multiplier configurable

Cezary Miączd2b9b4738ccd
diff --git a/saleor/settings.py b/saleor/settings.py
index ece7c2a578..61b4a81987 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -573,7 +573,7 @@ CELERY_RESULT_SERIALIZER = "json"
CELERY_TASK_ALWAYS_EAGER = not CELERY_BROKER_URL
CELERY_TASK_SERIALIZER = "json"
CELERY_TIMEZONE = TIME_ZONE
-CELERY_WORKER_PREFETCH_MULTIPLIER = 1
+CELERY_WORKER_PREFETCH_MULTIPLIER = int(os.environ.get("CELERY_WORKER_PREFETCH_MULTIPLIER", 1))
# Expire orders task setting
BEAT_EXPIRE_ORDERS_AFTER_TIMEDELTA = timedelta(