Skip to content

Commit 6aad3b0

Browse files
committed
fix wait
1 parent 133d884 commit 6aad3b0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/aiida/engine/processes/control.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ def _perform_actions(
229229
"""
230230
futures = {}
231231

232+
breakpoint()
232233
for process in processes:
233234
if process.is_terminated:
234235
LOGGER.error(f'Process<{process.pk}> is already terminated.')
@@ -278,12 +279,10 @@ def handle_result(result):
278279

279280
try:
280281
for future, process in futures.items():
281-
# unwrap is need here since LoopCommunicator will also wrap a future
282-
unwrapped = unwrap_kiwi_future(future)
283282
try:
284-
result = unwrapped.result(timeout=timeout)
283+
result = future.result(timeout=timeout)
285284
except communications.TimeoutError:
286-
cancelled = unwrapped.cancel()
285+
cancelled = future.cancel()
287286
if cancelled:
288287
LOGGER.error(f'call to {infinitive} Process<{process.pk}> timed out and was cancelled.')
289288
else:
@@ -304,9 +303,10 @@ def handle_result(result):
304303

305304
for future in concurrent.futures.as_completed(scheduled.keys(), timeout=timeout):
306305
process = scheduled[future]
306+
unwrapped = unwrap_kiwi_future(future)
307307

308308
try:
309-
result = future.result()
309+
result = unwrapped.result(timeout=timeout)
310310
except Exception as exception:
311311
LOGGER.error(f'failed to {infinitive} Process<{process.pk}>: {exception}')
312312
else:

0 commit comments

Comments
 (0)