Gitlab Services gracefull shutdown

Hello. I am using custom service and have to stop it gracefully. The service script based on python3 and has signals handler. Handler is working, it is tested. But when stage (or pipeline) has been finished, no any handler’s results (logs, operations).
Could smbd says how exactly executors (gitlab-runner, docker, shell) stopping containers with services?

P.S. My app is running as PID 1 in container. Parent PID is 0