Skip to content

Commit ef17a05

Browse files
authored
Merge pull request #59 from cuda-networks/fix_signal_bug
Fix signal bug
2 parents be1f73c + ddc5127 commit ef17a05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

eb_sqs/worker/service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def __init__(self):
3636
def process_queues(self, queue_names):
3737
# type: (list) -> None
3838
signal.signal(signal.SIGTERM, self._exit_called)
39-
signal.signal(signal.SIGKILL, self._exit_called)
4039

4140
self.write_healthcheck_file()
4241
self._last_healthcheck_time = timezone.now()
@@ -191,5 +190,6 @@ def write_healthcheck_file(self):
191190
with open(settings.HEALTHCHECK_FILE_NAME, 'w') as file:
192191
file.write(timezone.now().isoformat())
193192

194-
def _exit_called(self):
193+
def _exit_called(self, signum, frame):
194+
logger.info('[django-eb-sqs] Termination signal called: {}'.format(signum))
195195
self._exit_gracefully = True

0 commit comments

Comments
 (0)