Handle TERM signal to stop all workers