mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-10 15:22:24 -05:00
When Cloud Foundry applications are to be rescheduled from one cell to another, or they are stopped, they are sent a SIGTERM signal and 10 seconds later, a SIGKILL signal. Currently the scripts trap the POSIX defined EXIT handler, rather than the signal directly. In order for the signal to properly be propagated to celery, and the celery workers, the script should call the on_exit function when receiving a TERM signal. Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk> Co-authored-by: Becca <rebecca.law@digital.cabinet.office.gov.uk> Co-authored-by: Toby <toby.lornewelch-richards@digital.cabinet.office.gov.uk>