
Cloud Run sends a SIGTERM signal to your container instance before the container instance terminates, due to an event like scale down or deleted revision. By handling this signal, you can now gracefully terminate your applications and do some cleanup tasks–as opposed to an abrupt shutdown of the container.
I found some information that can be of help for you:
https://tudip.com/blog-post/understanding-graceful-shutdowns-on-cloud-run/
https://cloud.google.com/run/docs/samples/cloudrun-sigterm-handler
https://cloud.google.com/blog/topics/developers-practitioners/graceful-shutdowns-cloud-run-deep-dive
https://unix.stackexchange.com/questions/10231/when-does-the-system-send-a-sigterm-to-a-process
https://unix.stackexchange.com/questions/242598/reason-to-sigterm-jobs-in-case-the-shell-is-closed
https://stackoverflow.com/questions/66854761/graceful-shutdowns-on-cloud-run
https://stackoverflow.com/questions/59491005/handling-a-cloud-run-container-shutdown