Ver Fonte

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

huangrunheng há 11 meses atrás
pai
commit
fec08ed592
1 ficheiros alterados com 2 adições e 1 exclusões
  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():