*Nix signal handling in python process
Investigate signal handling (kill by kubernetes)
From https://pracucci.com/graceful-shutdown-of-kubernetes-pods.html
How it works
When a pod should be terminated:
A SIGTERM signal is sent to the main process (PID 1) in each container, and a “grace period” countdown starts (defaults to 30 seconds - see below to change it).
Upon the receival of the SIGTERM, each container should start a graceful shutdown of the running application and exit.
If a container doesn’t terminate within the grace period, a SIGKILL signal will be sent and the container violently terminated.
So obsportal has 30s to handle SIGTERM and shutdown gracefully
Edited by Laurent Bourgès