diff --git a/backend/src/baserow/config/settings/base.py b/backend/src/baserow/config/settings/base.py index 77fe6f8f1b..51f591875f 100644 --- a/backend/src/baserow/config/settings/base.py +++ b/backend/src/baserow/config/settings/base.py @@ -180,8 +180,8 @@ "baserow.contrib.database.table.tasks.run_row_count_job": {"queue": "export"}, "baserow.core.jobs.tasks.clean_up_jobs": {"queue": "export"}, } -CELERY_SOFT_TIME_LIMIT = 60 * 5 # 5 minutes -CELERY_TIME_LIMIT = CELERY_SOFT_TIME_LIMIT + 60 # 60 seconds +CELERY_TASK_SOFT_TIME_LIMIT = 60 * 5 # 5 minutes +CELERY_TASK_TIME_LIMIT = CELERY_TASK_SOFT_TIME_LIMIT + 60 # 60 seconds CELERY_REDBEAT_REDIS_URL = REDIS_URL # Explicitly set the same value as the default loop interval here so we can use it diff --git a/backend/tests/baserow/config/test_celery_config.py b/backend/tests/baserow/config/test_celery_config.py new file mode 100644 index 0000000000..9e31e57c72 --- /dev/null +++ b/backend/tests/baserow/config/test_celery_config.py @@ -0,0 +1,17 @@ +import pytest + +from baserow.config.celery import app + + +@pytest.mark.django_db +def test_celery_task_time_limits_are_configured(): + """ + Verify that Celery task time limits are correctly configured. + + Using the wrong names (e.g. without 'TASK_') causes the settings to be + silently ignored. + """ + + # Both values would be None if the settings were not configured correctly + assert app.conf.task_soft_time_limit > 0 + assert app.conf.task_time_limit > app.conf.task_soft_time_limit diff --git a/changelog/entries/unreleased/bug/fixed_celery_time_limits_to_use_the_correct_config_names.json b/changelog/entries/unreleased/bug/fixed_celery_time_limits_to_use_the_correct_config_names.json new file mode 100644 index 0000000000..b83332e3f9 --- /dev/null +++ b/changelog/entries/unreleased/bug/fixed_celery_time_limits_to_use_the_correct_config_names.json @@ -0,0 +1,9 @@ +{ + "type": "bug", + "message": "Fixed Celery time limits to use the correct config names.", + "issue_origin": "github", + "issue_number": null, + "domain": "core", + "bullet_points": [], + "created_at": "2026-02-02" +} \ No newline at end of file