File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/core/minos-microservice-common/minos/common Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -124,15 +124,19 @@ def launch(self) -> NoReturn:
124124
125125 logger .info ("Starting microservice..." )
126126
127+ exception = None
127128 try :
128129 self .loop .run_until_complete (self .setup ())
129130 self .loop .run_until_complete (self .entrypoint .__aenter__ ())
130131 logger .info ("Microservice is up and running!" )
131132 self .loop .run_forever ()
132- except KeyboardInterrupt : # pragma: no cover
133+ except KeyboardInterrupt as exc : # pragma: no cover
133134 logger .info ("Stopping microservice..." )
135+ exception = exc
136+ except Exception as exc : # pragma: no cover
137+ exception = exc
134138 finally :
135- self .graceful_shutdown ()
139+ self .graceful_shutdown (exception )
136140
137141 def graceful_shutdown (self , err : Exception = None ) -> None :
138142 """Shutdown the execution gracefully.
You can’t perform that action at this time.
0 commit comments