moonraker: add the SIGTERM handler in server_init()
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
1072958534
commit
9e9f9ee0fd
|
@ -146,8 +146,6 @@ class Server:
|
|||
self.register_remote_method(
|
||||
'process_status_update', self._process_status_update,
|
||||
need_klippy_reg=False)
|
||||
self.event_loop.add_signal_handler(
|
||||
signal.SIGTERM, self._handle_term_signal)
|
||||
|
||||
@property
|
||||
def klippy_apis(self) -> KlippyAPI:
|
||||
|
@ -178,6 +176,9 @@ class Server:
|
|||
return config
|
||||
|
||||
async def server_init(self, start_server: bool = True) -> None:
|
||||
self.event_loop.add_signal_handler(
|
||||
signal.SIGTERM, self._handle_term_signal)
|
||||
|
||||
# Perform asynchronous init after the event loop starts
|
||||
optional_comps: List[Coroutine] = []
|
||||
for name, component in self.components.items():
|
||||
|
|
Loading…
Reference in New Issue