File tree Expand file tree Collapse file tree
src/executorlib/task_scheduler/file Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import os
22from typing import Optional
3+ from subprocess import CalledProcessError
34
45from pysqa import QueueAdapter
56
@@ -90,8 +91,14 @@ def execute_with_pysqa(
9091 )
9192 submit_kwargs .update (resource_dict )
9293 set_current_directory_in_environment ()
93- queue_id = qa .submit_job (** submit_kwargs )
94- dump (file_name = file_name , data_dict = {"queue_id" : queue_id })
94+ try :
95+ queue_id = qa .submit_job (** submit_kwargs )
96+ except (ValueError , CalledProcessError ) as error :
97+ dump (file_name = file_name , data_dict = {"error" : error })
98+ file_name_out = os .path .splitext (file_name )[0 ][:- 2 ]
99+ os .rename (file_name_out + "_i.h5" , file_name_out + "_o.h5" )
100+ else :
101+ dump (file_name = file_name , data_dict = {"queue_id" : queue_id })
95102 return queue_id
96103
97104
You can’t perform that action at this time.
0 commit comments