Skip to content

Commit 9415dd4

Browse files
Remove unnecessary handler instantiation in PySpringApplication's graceful shutdown initialization
1 parent 3c833fd commit 9415dd4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

py_spring_core/core/application/py_spring_application.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,7 @@ def __init_graceful_shutdown(self) -> None:
295295
handler_cls = self._init_external_handler(GracefulShutdownHandler)
296296
if handler_cls is None:
297297
return
298-
299-
handler: GracefulShutdownHandler = handler_cls()
298+
handler_cls()
300299
logger.debug(f"[{handler_type} INIT] Graceful shutdown initialized")
301300

302301
def __configure_uvicorn_logging(self):

0 commit comments

Comments
 (0)