Workhorse graceful shutdown
It would be nice if sending SIGINT or SIGTERM to gitlab-workhorse did the following:
- Closed the listen() socket
- Gave currently-active HTTP requests some time to complete
- Forced closed any lingering HTTP requests
- Exited cleanly
I'm familiar with https://github.com/tylerb/graceful to do this, but there are other options too.
This sort of pattern is good for making frequent upgrades less painful for the user. With careful deployment, you can change the running code version without dropping a single request.
Edited by Nick Thomas