File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -35,12 +35,8 @@ def __init__(self):
3535
3636 def process_queues (self , queue_names ):
3737 # type: (list) -> None
38- def termination_handler (signum , frame ):
39- 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 )
38+ signal .signal (signal .SIGTERM , self ._exit_called )
39+ signal .signal (signal .SIGKILL , self ._exit_called )
4440
4541 self .write_healthcheck_file ()
4642 self ._last_healthcheck_time = timezone .now ()
@@ -195,5 +191,6 @@ def write_healthcheck_file(self):
195191 with open (settings .HEALTHCHECK_FILE_NAME , 'w' ) as file :
196192 file .write (timezone .now ().isoformat ())
197193
198- def _exit_called (self ):
194+ def _exit_called (self , signum , frame ):
195+ logger .info ('[django-eb-sqs] Termination signal called: {}' .format (signum ))
199196 self ._exit_gracefully = True
You can’t perform that action at this time.
0 commit comments