Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions contentcuration/contentcuration/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,11 @@ def gettext(s):
"result_serializer": "json",
"result_extended": True,
"worker_send_task_events": True,
# Graceful shutdown: allow 28 seconds for tasks to complete before forced termination
# This is 2 seconds less than Kubernetes terminationGracePeriodSeconds (30s)
"worker_soft_shutdown_timeout": int(
os.getenv("CELERY_WORKER_SOFT_SHUTDOWN_TIMEOUT", "28")
),
}

# When cleaning up orphan nodes, only clean up any that have been last modified
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ x-studio-environment:
CELERY_BROKER_ENDPOINT: redis
CELERY_RESULT_BACKEND_ENDPOINT: redis
CELERY_REDIS_PASSWORD: ""
REMAP_SIGTERM: "SIGQUIT"
PROBER_STUDIO_BASE_URL: http://studio-app:8080/{path}

x-studio-worker:
Expand Down