Celery 5.5 + shutdown timeouts

This commit is contained in:
Joel Falknau 2025-04-07 14:01:33 +10:00
parent 57b3841293
commit af87da876b
No known key found for this signature in database
2 changed files with 5 additions and 1 deletions

View File

@ -14,6 +14,10 @@ app = Celery('myauth')
# Celery startup if it is unavailable.
app.conf.broker_connection_retry_on_startup = True
# Set a hard task execution time of 5 minutes before celery will cold restart
app.conf.worker_soft_shutdown_timeout = 300
app.conf.worker_enable_soft_shutdown_on_idle = True
# Using a string here means the worker don't have to serialize
# the configuration object to child processes.
app.config_from_object('django.conf:settings')

View File

@ -40,7 +40,7 @@ dynamic = [
dependencies = [
"bcrypt",
"beautifulsoup4",
"celery>=5.4,<6",
"celery>=5.5,<6",
"celery-once>=3.0.1",
"django>=5.1,<5.2",
"django-bootstrap-form",