@@ -192,15 +192,15 @@ def run(self, pdb_on_exception=False):
192
192
all_mod_spec .extend (recovery .get ('_all_mod_spec' ))
193
193
if lp :
194
194
l_logger .log (
195
- logging .INFO ,
196
- 'Recovering from task number {} in folder {}.' .format (starting_task ,
197
- recovery_dir ))
195
+ logging .INFO ,
196
+ 'Recovering from task number {} in folder {}.' .format (starting_task ,
197
+ recovery_dir ))
198
198
if recovery_mode == 'cp' and launch_dir != recovery_dir :
199
199
if lp :
200
200
l_logger .log (
201
- logging .INFO ,
202
- 'Copying data from recovery folder {} to folder {}.' .format (recovery_dir ,
203
- launch_dir ))
201
+ logging .INFO ,
202
+ 'Copying data from recovery folder {} to folder {}.' .format (recovery_dir ,
203
+ launch_dir ))
204
204
distutils .dir_util .copy_tree (recovery_dir , launch_dir , update = 1 )
205
205
206
206
else :
@@ -215,7 +215,7 @@ def run(self, pdb_on_exception=False):
215
215
shutil .copyfileobj (fin , fout )
216
216
217
217
if lp :
218
- message = 'RUNNING fw_id: {} in directory: {}' .\
218
+ message = 'RUNNING fw_id: {} in directory: {}' . \
219
219
format (m_fw .fw_id , os .getcwd ())
220
220
l_logger .log (logging .INFO , message )
221
221
@@ -245,7 +245,7 @@ def run(self, pdb_on_exception=False):
245
245
Rocket .update_checkpoint (lp , launch_dir , launch_id , checkpoint )
246
246
247
247
if lp :
248
- l_logger .log (logging .INFO , "Task started: %s." % t .fw_name )
248
+ l_logger .log (logging .INFO , "Task started: %s." % t .fw_name )
249
249
250
250
if my_spec .get ("_add_launchpad_and_fw_id" ):
251
251
t .fw_id = m_fw .fw_id
@@ -275,7 +275,7 @@ def run(self, pdb_on_exception=False):
275
275
except BaseException as e :
276
276
if lp :
277
277
l_logger .log (logging .WARNING ,
278
- "Exception couldn't be serialized: %s " % e )
278
+ "Exception couldn't be serialized: %s " % e )
279
279
exception_details = None
280
280
281
281
try :
@@ -371,10 +371,10 @@ def run(self, pdb_on_exception=False):
371
371
except LockedWorkflowError as e :
372
372
l_logger .log (logging .DEBUG , traceback .format_exc ())
373
373
l_logger .log (logging .WARNING ,
374
- "Firework {} reached final state {} but couldn't complete the update of "
375
- "the database. Reason: {}\n Refresh the WF to recover the result "
376
- "(lpad admin refresh -i {})." .format (
377
- self .fw_id , final_state , e , self .fw_id ))
374
+ "Firework {} reached final state {} but couldn't complete the update of "
375
+ "the database. Reason: {}\n Refresh the WF to recover the result "
376
+ "(lpad admin refresh -i {})." .format (
377
+ self .fw_id , final_state , e , self .fw_id ))
378
378
return True
379
379
380
380
except Exception :
@@ -403,10 +403,10 @@ def run(self, pdb_on_exception=False):
403
403
except LockedWorkflowError as e :
404
404
l_logger .log (logging .DEBUG , traceback .format_exc ())
405
405
l_logger .log (logging .WARNING ,
406
- "Firework {} fizzled but couldn't complete the update of the database."
407
- " Reason: {}\n Refresh the WF to recover the result "
408
- "(lpad admin refresh -i {})." .format (
409
- self .fw_id , final_state , e , self .fw_id ))
406
+ "Firework {} fizzled but couldn't complete the update of the database."
407
+ " Reason: {}\n Refresh the WF to recover the result "
408
+ "(lpad admin refresh -i {})." .format (
409
+ self .fw_id , final_state , e , self .fw_id ))
410
410
return True
411
411
else :
412
412
fpath = zpath ("FW_offline.json" )
@@ -445,7 +445,7 @@ def decorate_fwaction(self, fwaction, my_spec, m_fw, launch_dir):
445
445
446
446
if my_spec .get ("_pass_job_info" ):
447
447
job_info = list (my_spec .get ("_job_info" , []))
448
- this_job_info = {"fw_id" : m_fw .fw_id , "name" : m_fw .name , "launch_dir" : launch_dir , "state" :m_fw .state }
448
+ this_job_info = {"fw_id" : m_fw .fw_id , "name" : m_fw .name , "launch_dir" : launch_dir , "state" : m_fw .state }
449
449
if this_job_info not in job_info :
450
450
job_info .append (this_job_info )
451
451
fwaction .mod_spec .append ({"_push_all" : {"_job_info" : job_info }})
@@ -463,9 +463,9 @@ def decorate_fwaction(self, fwaction, my_spec, m_fw, launch_dir):
463
463
files = glob .glob (os .path .join (launch_dir , v ))
464
464
if files :
465
465
filepath = sorted (files )[- 1 ]
466
- fwaction .mod_spec .append ( {
467
- "_set" : {"_files_prev->{:s}" .format (k ): filepath }
468
- } )
466
+ fwaction .mod_spec .append ({
467
+ "_set" : {"_files_prev->{:s}" .format (k ): filepath }
468
+ })
469
469
elif "_files_prev" in my_spec :
470
470
# This ensures that _files_prev are not passed from Firework to
471
471
# Firework. We do not want output files from fw1 to be used by fw3
0 commit comments