File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
src/aiida_sssp_workflow/workflows Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,15 @@ def on_terminated(self):
31
31
self .report (f"{ type (self )} : remote folders will not be cleaned" )
32
32
return
33
33
34
- # The clen_wordir is modified to not clean the remote folder of the caching node.
35
- cleaned_calcs = operate_calcjobs (
36
- self .node , operator = clean_workdir , all_same_nodes = False
37
- )
38
-
39
- if cleaned_calcs :
34
+ try :
35
+ cleaned_calcs = operate_calcjobs (
36
+ self .node , operator = clean_workdir , all_same_nodes = False
37
+ )
38
+ except RuntimeError as exc :
39
+ self .logger .warning (
40
+ f"clean remote workdir folder { self .inputs .clean_workir } failed: { exc } "
41
+ )
42
+ else :
40
43
self .report (
41
44
f"cleaned remote folders of calculations: { ' ' .join (map (str , cleaned_calcs ))} "
42
45
)
Original file line number Diff line number Diff line change 3
3
WorkChain calculate phonon frequencies at Gamma
4
4
"""
5
5
6
+ from builtins import RuntimeError
6
7
from aiida import orm
7
8
from aiida .common import NotExistentAttributeError
8
9
from aiida .engine import ToContext , while_
@@ -198,7 +199,7 @@ def finalize(self):
198
199
cleaned_calcs = operate_calcjobs (
199
200
self .node , operator = clean_workdir , all_same_nodes = False
200
201
)
201
- except ConnectionError as exc :
202
+ except RuntimeError as exc :
202
203
self .logger .warning (
203
204
f"clean remote workdir folder { self .inputs .clean_workir } failed: { exc } "
204
205
)
You can’t perform that action at this time.
0 commit comments