How to process SIGTERM signal gracefully? How to process SIGTERM signal gracefully? python python