@@ -72,7 +72,6 @@ def create_condor_config(config: dict[str, Any],
7272 cfg += f'error = log/{ sample_name } /'
7373 cfg += f'condor_job.{ sample_name } .$(ClusterId).$(ProcId).error\n '
7474
75-
7675 cfg += 'getenv = False\n '
7776
7877 build_os = determine_os (config ['fccana-dir' ])
@@ -169,7 +168,7 @@ def submit_job(cmd: str, max_trials: int) -> bool:
169168 LOGGER .info ('Submission successful.\n ' )
170169 return True
171170
172- LOGGER .warning ('Error occured while submitting, retrying...\n '
171+ LOGGER .warning ('Error occurred while submitting, retrying...\n '
173172 'Trial: %i / %i\n '
174173 'Error: %s' , i , max_trials , stderr )
175174 time .sleep (10 )
@@ -296,7 +295,8 @@ def send_sample(config: dict[str, Any],
296295 # Create log directory
297296 current_date = datetime .datetime .fromtimestamp (
298297 datetime .datetime .now ().timestamp ()).strftime ('%Y-%m-%d_%H-%M-%S' )
299- batch_dir = os .path .join ('batch-submission-files' , current_date , sample_name )
298+ batch_dir = os .path .join ('batch-submission-files' ,
299+ current_date , sample_name )
300300 if not os .path .exists (batch_dir ):
301301 os .system (f'mkdir -p { batch_dir } ' )
302302
@@ -396,7 +396,9 @@ def send_sample(config: dict[str, Any],
396396 else :
397397 batch_cmd = f'condor_submit { condor_config_path } '
398398 LOGGER .info ('Job submission command:\n %s' , batch_cmd )
399- success = submit_job (batch_cmd , 3 )
399+
400+ max_trials = 3
401+ success = submit_job (batch_cmd , max_trials )
400402 if not success :
401403 LOGGER .error ('Failed submitting after: %i trials!\n Aborting...' ,
402404 max_trials )
0 commit comments