From d9fae85a5dc18e1db04f75fe38807a0d53e1b621 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Wed, 30 Oct 2024 16:12:12 +0100 Subject: [PATCH] Put a single CalcJob with a transport request --- src/aiida/engine/runners.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/aiida/engine/runners.py b/src/aiida/engine/runners.py index 42cb76244c..3e573f8094 100644 --- a/src/aiida/engine/runners.py +++ b/src/aiida/engine/runners.py @@ -258,7 +258,15 @@ def kill_process(_num, _frame): try: signal.signal(signal.SIGINT, kill_process) signal.signal(signal.SIGTERM, kill_process) - process_inited.execute() + + # TODO: only do this if the node is CalcJob? + # or you think it is fine for every process we open one anyway? + # The downside will be the long opening SSH connection might be killed from + # server side then it will trigger the expo mechanism. (TBD) + authinfo = process_inited.node.get_authinfo() + with self.transport.request_transport(authinfo): + process_inited.execute() + finally: signal.signal(signal.SIGINT, original_handler_int) signal.signal(signal.SIGTERM, original_handler_term)