2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-02-23 04:10:17 +08:00

fix: call Stop on all other signals to correctly set the server state for the shutdown procedure to complete successfully

* possibly fixes: #979
This commit is contained in:
Mohammed Sohail 2024-12-09 10:08:36 +03:00
parent 02907551b4
commit 71c746d00a
No known key found for this signature in database
GPG Key ID: 7DD45520C01CD85D

View File

@ -24,10 +24,12 @@ func (srv *Server) waitForSignals() {
if sig == unix.SIGTSTP { if sig == unix.SIGTSTP {
srv.Stop() srv.Stop()
continue continue
} } else {
srv.Stop()
break break
} }
} }
}
func (s *Scheduler) waitForSignals() { func (s *Scheduler) waitForSignals() {
s.logger.Info("Send signal TERM or INT to stop the scheduler") s.logger.Info("Send signal TERM or INT to stop the scheduler")