Skip to content

Commit b54ceb3

Browse files
authored
Fix config names for Celery timeout (baserow#4613)
* Fix config names for Celery timeout * Add test
1 parent 0cf64c4 commit b54ceb3

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

backend/src/baserow/config/settings/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@
180180
"baserow.contrib.database.table.tasks.run_row_count_job": {"queue": "export"},
181181
"baserow.core.jobs.tasks.clean_up_jobs": {"queue": "export"},
182182
}
183-
CELERY_SOFT_TIME_LIMIT = 60 * 5 # 5 minutes
184-
CELERY_TIME_LIMIT = CELERY_SOFT_TIME_LIMIT + 60 # 60 seconds
183+
CELERY_TASK_SOFT_TIME_LIMIT = 60 * 5 # 5 minutes
184+
CELERY_TASK_TIME_LIMIT = CELERY_TASK_SOFT_TIME_LIMIT + 60 # 60 seconds
185185

186186
CELERY_REDBEAT_REDIS_URL = REDIS_URL
187187
# Explicitly set the same value as the default loop interval here so we can use it
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import pytest
2+
3+
from baserow.config.celery import app
4+
5+
6+
@pytest.mark.django_db
7+
def test_celery_task_time_limits_are_configured():
8+
"""
9+
Verify that Celery task time limits are correctly configured.
10+
11+
Using the wrong names (e.g. without 'TASK_') causes the settings to be
12+
silently ignored.
13+
"""
14+
15+
# Both values would be None if the settings were not configured correctly
16+
assert app.conf.task_soft_time_limit > 0
17+
assert app.conf.task_time_limit > app.conf.task_soft_time_limit
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "bug",
3+
"message": "Fixed Celery time limits to use the correct config names.",
4+
"issue_origin": "github",
5+
"issue_number": null,
6+
"domain": "core",
7+
"bullet_points": [],
8+
"created_at": "2026-02-02"
9+
}

0 commit comments

Comments
 (0)