diff --git a/src/openklant/conf/base.py b/src/openklant/conf/base.py index 9865cd0f..52aaf8da 100644 --- a/src/openklant/conf/base.py +++ b/src/openklant/conf/base.py @@ -1,4 +1,5 @@ from open_api_framework.conf.base import * # noqa +from open_api_framework.conf.utils import config # noqa from .api import * # noqa @@ -50,3 +51,13 @@ "openklant.setup_configuration.steps.TokenAuthConfigurationStep", "mozilla_django_oidc_db.setup_configuration.steps.AdminOIDCConfigurationStep", ) + +# +# Celery +# + +# Add (by default) 5 (soft), 15 (hard) minute timeouts to all Celery tasks. +CELERY_TASK_TIME_LIMIT = config("CELERY_TASK_HARD_TIME_LIMIT", default=15 * 60) # hard +CELERY_TASK_SOFT_TIME_LIMIT = config( + "CELERY_TASK_SOFT_TIME_LIMIT", default=5 * 60 +) # soft