Skip to content

Commit 6f1b828

Browse files
authored
Merge pull request #67 from devsapp/fix-provision
fix wait provision OK
2 parents a4801bc + 4dd89e5 commit 6f1b828

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

src/subCommands/deploy/impl/provision_config.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,18 @@ export default class ProvisionConfig extends Base {
7575
await logs.run();
7676
logger.warn('=========== LAST 10 MINUTES END =========== ');
7777
*/
78-
getCurrentErrorCount++;
79-
if (getCurrentErrorCount > 3 || (index > 6 && getCurrentErrorCount > 0)) {
80-
throw new Error(
81-
`get ${this.functionName}/${qualifier} provision config error: ${currentError}`,
82-
);
78+
// 如果是系统内部错误,则继续尝试
79+
if (!currentError.includes('an internal error has occurred')) {
80+
// 不是系统内部错误,满足一定的重试次数则退出
81+
getCurrentErrorCount++;
82+
if (getCurrentErrorCount > 3 || (index > 6 && getCurrentErrorCount > 0)) {
83+
logger.error(
84+
`get ${this.functionName}/${qualifier} provision config getCurrentErrorCount=${getCurrentErrorCount}`,
85+
);
86+
throw new Error(
87+
`get ${this.functionName}/${qualifier} provision config error: ${currentError}`,
88+
);
89+
}
8390
}
8491
}
8592
logger.info(

0 commit comments

Comments
 (0)