Skip to content

Commit 8a05606

Browse files
Patch exit on completed state
1 parent b49f30f commit 8a05606

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tidy3d/web/api/webapi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1132,10 +1132,11 @@ def _status_to_stage(status: str) -> tuple[str, int]:
11321132
while True:
11331133
detail = _batch_detail(batch_id)
11341134
status = detail.totalStatus.value
1135+
postprocess_status = detail.postprocessStatus
11351136
total = detail.totalTask or 0
11361137
p = detail.postprocessSuccess or 0
11371138
progress.update(p_post, completed=(p / total) if total else 0.0)
1138-
if total and p >= total:
1139+
if postprocess_status == "completed":
11391140
break
11401141
if status in terminal_errors:
11411142
raise WebError(f"Batch {batch_id} terminated: {status}")

tidy3d/web/core/task_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ class BatchDetail(TaskBase):
232232
totalStatus: BatchStatus = None
233233
totalTask: int = 0
234234
preprocessSuccess: int = 0
235-
postprocessStatus: TaskStatus = None
235+
postprocessStatus: str = None
236236
validateSuccess: int = 0
237237
runSuccess: int = 0
238238
postprocessSuccess: int = 0

0 commit comments

Comments
 (0)