Skip to content

Commit 873840c

Browse files
committed
abort deploy on error
1 parent c1bc905 commit 873840c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/components/views/Instance/Edit/Repository.tsx

+8-6
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,15 @@ class Repository extends React.Component<IProps, IState> {
319319
const deployinterval = setInterval(() => {
320320
const targetJob = JobsController.jobs.get(jobId);
321321
if (typeof targetJob?.progress === "number" || targetJob?.stoppedAt) {
322-
void DreamMakerClient.startCompile(this.context.instance.id).then(
323-
response => {
324-
if (response.code === StatusCode.ERROR) {
325-
this.addError(response.error);
322+
if (targetJob.errorCode === undefined && targetJob.exceptionDetails === undefined) {
323+
void DreamMakerClient.startCompile(this.context.instance.id).then(
324+
response => {
325+
if (response.code === StatusCode.ERROR) {
326+
this.addError(response.error);
327+
}
326328
}
327-
}
328-
);
329+
);
330+
}
329331
clearInterval(deployinterval);
330332
}
331333
}, 5000);

0 commit comments

Comments
 (0)