|
@@ -358,13 +358,20 @@ async function restartApp(param) {
|
|
|
logger.info('当前app', app.id, app.threadStatus);
|
|
|
|
|
|
|
|
|
- const closeResult = await closeApp(param)
|
|
|
+
|
|
|
+ await closeApp(param)
|
|
|
|
|
|
+ let num = 0;
|
|
|
while (true) {
|
|
|
await delay(1000)
|
|
|
+
|
|
|
const runResult = await run(param)
|
|
|
|
|
|
- if (runResult) break
|
|
|
+
|
|
|
+ if (runResult || num >= 5){
|
|
|
+ break
|
|
|
+ }
|
|
|
+ num += 1
|
|
|
}
|
|
|
|
|
|
|