Skip to content

Commit 7b45680

Browse files
committed
extra condition before printing early shutoff log
1 parent 00d1280 commit 7b45680

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- Port name duplication in smatrix plugin for multimode ports.
1414
- Web functions create the leading directories for the supplied filename if they don't exist.
1515
- Some docstring examples that were giving warnings.
16+
- `web.monitor()` only prints message when condition met.
1617

1718
## [2.0.2] - 2023-4-3
1819

tidy3d/web/webapi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ def monitor_preprocess() -> None:
309309
progress.update(pbar_pd, completed=perc_done, description=new_description)
310310
time.sleep(RUN_REFRESH_TIME)
311311

312-
if perc_done is not None and perc_done < 100:
312+
perc_done, field_decay = get_run_info(task_id)
313+
if perc_done is not None and perc_done < 100 and field_decay > 0:
313314
console.log("early shutoff detected, exiting.")
314315

315316
progress.update(pbar_pd, completed=100, refresh=True)

0 commit comments

Comments
 (0)