We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be1f73c commit 9c5fd85Copy full SHA for 9c5fd85
eb_sqs/worker/service.py
@@ -35,8 +35,12 @@ def __init__(self):
35
36
def process_queues(self, queue_names):
37
# type: (list) -> None
38
- signal.signal(signal.SIGTERM, self._exit_called)
39
- signal.signal(signal.SIGKILL, self._exit_called)
+ def termination_handler(signum, frame):
+ logger.info('[django-eb-sqs] Termination signal called: {}'.format(signum))
40
+ self._exit_called()
41
+
42
+ signal.signal(signal.SIGTERM, termination_handler)
43
+ signal.signal(signal.SIGKILL, termination_handler)
44
45
self.write_healthcheck_file()
46
self._last_healthcheck_time = timezone.now()
0 commit comments