Open Leechael opened 11 years ago
It is difficult problem.
If use msgpack-rpc-python as a stand alone server, then this code may be helpful.
But msgpack-rpc-python is a library. In this case, library doesn't know an application requirement. An application knows "this signal means", "How to handle this signal", but msgpack-rpc-python doesn't.
What do you think?
Hi @repeatedly , In my scenario, I'm run msgpack-rpc with Supervisord, and using msgpack-rpc added components to my main service. So when I upgrading my component, I'm using Supervisord send SIGHUP signal to msgpack-rpc server than restart it gracefully. When I have multiple components run base msgpack-rpc, this way added signal handling is the fast way and reduce codes for same job.
I'd like hear some advises from you.
I'm added some codes for graceful shutdown support, may be helpful. :P