Skip to content

Commit 10255c4

Browse files
committed
Revised what was not covered
1 parent 3ec6be6 commit 10255c4

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

autosubmit/autosubmit.py

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3122,8 +3122,6 @@ def recovery(
31223122

31233123
submitter = Autosubmit._get_submitter(as_conf)
31243124
submitter.load_platforms(as_conf)
3125-
if submitter.platforms is None:
3126-
return False
31273125
platforms = submitter.platforms
31283126

31293127
platforms_to_test = set()
@@ -3157,10 +3155,7 @@ def recovery(
31573155
if offline or not job.platform.connected:
31583156
offline_jobs.append(job.name)
31593157
else:
3160-
job.platform_name = as_conf.jobs_data.get(job.section, {}).get("PLATFORM", "").upper()
3161-
if not job.platform_name:
3162-
job.platform_name = hpcarch
3163-
3158+
job.platform_name = as_conf.jobs_data.get(job.section, {}).get("PLATFORM", hpcarch).upper()
31643159
# noinspection PyTypeChecker
31653160
job.platform = submitter.platforms[job.platform_name]
31663161
try:
@@ -3209,6 +3204,8 @@ def recovery(
32093204
except Exception as e:
32103205
raise AutosubmitCritical("Couldn't restore the experiment workflow", 7040, str(e))
32113206

3207+
# The expand/group was not covered before, in this PR it was just moved from be mandatory to optional
3208+
# Added TRY EXCEPT for plotting and detail to avoid recovery failure (as the jobs were recovered)
32123209
try:
32133210
if not noplot:
32143211
packages = JobPackagePersistence(expid).load()
@@ -3234,15 +3231,14 @@ def recovery(
32343231
expid, job_list.get_job_list(), os.path.join(exp_path, "/tmp/LOG_", expid),
32353232
output_format=output_type, packages=packages, show=not hide, groups=groups_dict,
32363233
job_list_object=job_list)
3237-
except BaseException as e:
3238-
raise AutosubmitCritical(
3239-
"An error has occurred while printing the workflow status."
3240-
"Check if you have X11 redirection and an img viewer correctly set",
3241-
7000, str(e)
3242-
)
3243-
3244-
if detail:
3245-
Autosubmit.detail(job_list)
3234+
except Exception as e:
3235+
Log.warning(f"An error has occurred while plotting the jobs list after recovery. "
3236+
"Check if you have X11 redirection and an img viewer correctly set. Trace: {str(e)}")
3237+
try:
3238+
if detail:
3239+
Autosubmit.detail(job_list)
3240+
except Exception as e:
3241+
Log.warning(f"An error has occurred while generating the detailed view of the jobs after recovery. Trace: {str(e)}")
32463242

32473243
return True
32483244

0 commit comments

Comments
 (0)