We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 661d2f2 commit 7053bb4Copy full SHA for 7053bb4
1 file changed
PyStemmusScope/bmi/local_process.py
@@ -86,7 +86,8 @@ def __init__(self, cfg_file: str) -> None:
86
"""Initialize the process."""
87
self.cfg_file = cfg_file
88
config = read_config(cfg_file)
89
-
+ self.sleep_duration = int(config.get("SleepDuration", 10))
90
+
91
exe_file = find_exe(config)
92
args = [exe_file, cfg_file, "bmi"]
93
@@ -153,7 +154,7 @@ def finalize(self) -> None:
153
154
"""Finalize the model."""
155
self.process = alive_process(self.process)
156
self.process.stdin.write(b"finalize\n") # type: ignore
- sleep(10)
157
+ sleep(self.sleep_duration)
158
if self.process.poll() != 0:
159
try:
160
self.process.terminate()
0 commit comments