Skip to content

Commit d6b3721

Browse files
committed
Fix OpenFOAM example
1 parent 3a51582 commit d6b3721

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/OpenFOAM/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ COPY . /simvue_client
99
RUN python3.11 -m ensurepip --upgrade
1010
RUN python3.11 -m pip install /simvue_client
1111
RUN python3.11 -m pip install -r /simvue_client/examples/OpenFOAM/requirements.txt
12-
COPY $simvue_file simvue.ini

examples/OpenFOAM/simvue_openfoam.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def open_foam_simvue_demo(all_run_script: str, ci: bool) -> None:
4141
uniq_id: str = f"{uuid.uuid4()}".split("-")[0]
4242

4343
@mp_tail_parse.log_parser
44-
def custom_parser(file_content: str, **_) -> tuple[dict[str, Any], dict[str, Any]]:
44+
def custom_parser(file_content: str, **__) -> tuple[dict[str, Any], dict[str, Any]]:
4545
exp1: re.Pattern[str] = re.compile(
4646
"^(.+): Solving for (.+), Initial residual = (.+), Final residual = (.+), No Iterations (.+)$"
4747
)
@@ -82,7 +82,7 @@ def custom_parser(file_content: str, **_) -> tuple[dict[str, Any], dict[str, Any
8282
completion_callback=lambda *_, **__: termination_trigger.set(),
8383
)
8484
with multiparser.FileMonitor(
85-
per_thread_callback=lambda metrics: run.log_metrics(metrics),
85+
per_thread_callback=lambda metrics, *_: run.log_metrics(metrics),
8686
exception_callback=run.log_event,
8787
terminate_all_on_fail=True,
8888
plain_logging=True,
@@ -94,6 +94,7 @@ def custom_parser(file_content: str, **_) -> tuple[dict[str, Any], dict[str, Any
9494
parser_func=custom_parser,
9595
path_glob_exprs=[os.path.join(log_location, "log.pimpleFoam")],
9696
)
97+
monitor.run()
9798

9899

99100
if __name__ in "__main__":

0 commit comments

Comments
 (0)