Explorar o código

fix(module): #1330 Add null check before restarting script instances in on_startup

huangrunheng hai 11 meses
pai
achega
fec08ed592
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      module/server/app.py

+ 2 - 1
module/server/app.py

@@ -48,7 +48,8 @@ async def on_startup():
     :return:
     """
     logger.info('OAS web service startup done')
-    await mm.restart_processes(app.state.script_instances)
+    if app.state.script_instances:
+        await mm.restart_processes(app.state.script_instances)
 
 
 async def on_shutdown():