Skip to content

Commit

Permalink
Put a single CalcJob with a transport request
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Oct 30, 2024
1 parent 7057238 commit d9fae85
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/aiida/engine/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d9fae85

Please sign in to comment.