Increase Celery task time limits.

Updated `task_soft_time_limit` to 3600 seconds and `task_time_limit` to 7200 seconds in both `celery.py` and `docker-compose.yml`. This allows tasks to run longer before being terminated, ensuring support for extended processing requirements.
This commit is contained in:
Egor Pavlovich Gorbunov 2025-05-06 14:58:39 +03:00
parent d87e93e705
commit 64a2fe7726
2 changed files with 4 additions and 4 deletions

View file

@ -51,8 +51,8 @@ services:
--autoscale=4,2 --autoscale=4,2
--max-tasks-per-child=100 --max-tasks-per-child=100
--max-memory-per-child=512000 --max-memory-per-child=512000
--soft-time-limit=1800 --soft-time-limit=3600
--time-limit=3600" --time-limit=7200"
volumes: volumes:
- .:/app - .:/app
env_file: env_file:

View file

@ -29,8 +29,8 @@ app.conf.update(
task_reject_on_worker_lost=True, task_reject_on_worker_lost=True,
worker_prefetch_multiplier=1, worker_prefetch_multiplier=1,
worker_max_tasks_per_child=100, worker_max_tasks_per_child=100,
task_soft_time_limit=1800, task_soft_time_limit=3600,
task_time_limit=3600, task_time_limit=7200,
) )
app.config_from_object("django.conf:settings", namespace="CELERY") app.config_from_object("django.conf:settings", namespace="CELERY")