Script Updates: Refactored health check and run scripts to adapt to the new CELERY_CONCURRENCY environment variable and added support for ddtrace-run, enabling APM in DataDog.
Introduction of CELERY_CONCURRENCY: Set to "16" in various environments, both in .env and task definitions.
Increased CPU Allocation: Increased the CPU allocation from 1024 to 2048 for the Celery task definitions in all environments.
Updated Local Docker: Update local Docker compose file and local envs to function correctly with updates to scripts.
Note
The ECS Celery health check (scripts/run_celery.py) was updated because appending ddtrace run made Celery a child of ddtrace. Therefore, the ECS Celery health check could not properly find the Celery PIDs and failed.
How Has This Been Tested?
Confirm Locally Docker Build OK
Ran usual commands to build and compose local Dockerfile without issue
I hard-coded the value of Celery works to be 2 in the check_celery.sh script. This would cause the health check to fail as the CELERY_CONCURRENCY is set to 16 in the task definitions.
Description
issue #2041
How Has This Been Tested?
Confirm Locally Docker Build OK
Confirmed Deployed OK
Confirmed Celery Service Available in APM
POST /v2/notifications/email
, I can see its related Celery tasks in APM.Confirmed CPU and Memory OK in ECS Celery Service
Confirmed Shutdown Logs Appears as Expected
Confirmed Health Check Works as Expected
I hard-coded the value of Celery works to be 2 in the
check_celery.sh
script. This would cause the health check to fail as the CELERY_CONCURRENCY is set to 16 in the task definitions.I deployed the update and confirm the ECS Celery service deploy failed.
Checklist