gocast
gocast copied to clipboard
Worker doesn't gracefully shut down
Describe the bug
When a worker is handling a stream and receives a SIGTERM
it shuts down which also kills the running livestream.
To Reproduce Steps to reproduce the behavior:
- start a stream
- restart the worker e.g. by using
docker service deploy --force live_worker
- -> stream stops playing
Expected behavior
Upon receiving a SIGTERM
, the worker should not accept further stream requests and stop as soon as all running jobs are completed.
Additional context
Paired with dockers stop_grace_period
we can use rolling upgrades without downtime.