Explorar el Código

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

huangrunheng hace 11 meses
padre
commit
fec08ed592
Se han modificado 1 ficheros con 2 adiciones y 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():