Skip to content

Commit

Permalink
Forceably terminate greenlets with TERM signal.
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed Jul 19, 2023
1 parent 4180cbe commit 6284422
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions huey/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ def _handle_stop_signal(self, sig_num, frame):
self._restart = False
self._graceful = False
if self.worker_type == WORKER_GREENLET:
# Ensure that the running greenlet (if not main) is interrupted.
raise KeyboardInterrupt
gevent.killall([t for _, t in self.worker_threads],
KeyboardInterrupt)

def _handle_restart_signal(self, sig_num, frame):
self._logger.info('Received SIGHUP, will restart')
Expand Down

0 comments on commit 6284422

Please sign in to comment.