From 131258517fe9dc696be3a538357395822ead3e2e Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Tue, 6 May 2025 16:39:21 +0300 Subject: [PATCH] Adjust Celery task time limits in configuration. Increased `task_soft_time_limit` to 7200 seconds and `task_time_limit` to 10800 seconds in both `celery.py` and `docker-compose.yml`. This change allows longer-running tasks to complete without premature termination. --- docker-compose.yml | 4 ++-- evibes/celery.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2dcc3371..027f7125 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -51,8 +51,8 @@ services: --autoscale=4,2 --max-tasks-per-child=100 --max-memory-per-child=512000 - --soft-time-limit=3600 - --time-limit=7200" + --soft-time-limit=7200 + --time-limit=10800" volumes: - .:/app env_file: diff --git a/evibes/celery.py b/evibes/celery.py index d977c273..2d21e8ce 100644 --- a/evibes/celery.py +++ b/evibes/celery.py @@ -29,8 +29,8 @@ app.conf.update( task_reject_on_worker_lost=True, worker_prefetch_multiplier=1, worker_max_tasks_per_child=100, - task_soft_time_limit=3600, - task_time_limit=7200, + task_soft_time_limit=7200, + task_time_limit=10800, ) app.config_from_object("django.conf:settings", namespace="CELERY")