@@ -82,9 +82,7 @@ def is_job_state_pending(self):
82
82
time_diff = time .time () - self ._job_info_creation_time
83
83
if self .is_zombie ():
84
84
sge_debug_print (
85
- "DONE! QJobInfo.IsPending found in 'zombie' list, returning False so claiming done!\n {}" .format (
86
- self
87
- )
85
+ f"DONE! QJobInfo.IsPending found in 'zombie' list, returning False so claiming done!\n { self } "
88
86
)
89
87
is_pending_status = False # Job explicitly found as being completed!
90
88
elif self .is_initializing () and (time_diff > 600 ):
@@ -253,21 +251,15 @@ def _parse_qstat_job_list(self, xml_job_list):
253
251
self ._task_dictionary [dictionary_job ].set_state ("zombie" )
254
252
else :
255
253
sge_debug_print (
256
- "ERROR: Job not in current parselist, "
257
- "and not in done list {}: {}" .format (
258
- dictionary_job , self ._task_dictionary [dictionary_job ]
259
- )
254
+ f"ERROR: Job not in current parselist, and not in done list { dictionary_job } : { self ._task_dictionary [dictionary_job ]} "
260
255
)
261
256
if self ._task_dictionary [dictionary_job ].is_initializing ():
262
257
is_completed = self ._qacct_verified_complete (dictionary_job )
263
258
if is_completed :
264
259
self ._task_dictionary [dictionary_job ].set_state ("zombie" )
265
260
else :
266
261
sge_debug_print (
267
- "ERROR: Job not in still in initialization mode, "
268
- "and not in done list {}: {}" .format (
269
- dictionary_job , self ._task_dictionary [dictionary_job ]
270
- )
262
+ f"ERROR: Job not in still in initialization mode, and not in done list { dictionary_job } : { self ._task_dictionary [dictionary_job ]} "
271
263
)
272
264
273
265
def _run_qstat (self , reason_for_qstat , force_instant = True ):
@@ -279,8 +271,7 @@ def _run_qstat(self, reason_for_qstat, force_instant=True):
279
271
-s s suspended jobs
280
272
"""
281
273
sge_debug_print (
282
- "WARNING: CONTACTING qmaster for jobs, "
283
- "{}: {}" .format (time .time (), reason_for_qstat )
274
+ f"WARNING: CONTACTING qmaster for jobs, { time .time ()} : { reason_for_qstat } "
284
275
)
285
276
if force_instant :
286
277
this_command = self ._qstat_instant_executable
@@ -340,8 +331,7 @@ def is_job_pending(self, task_id):
340
331
job_is_pending = self ._task_dictionary [task_id ].is_job_state_pending ()
341
332
else :
342
333
sge_debug_print (
343
- "ERROR: Job {} not in task list, "
344
- "even after forced qstat!" .format (task_id )
334
+ f"ERROR: Job { task_id } not in task list, even after forced qstat!"
345
335
)
346
336
job_is_pending = False
347
337
if not job_is_pending :
@@ -352,8 +342,7 @@ def is_job_pending(self, task_id):
352
342
self ._task_dictionary .pop (task_id )
353
343
else :
354
344
sge_debug_print (
355
- "ERROR: Job {} not in task list, "
356
- "but attempted to be removed!" .format (task_id )
345
+ f"ERROR: Job { task_id } not in task list, but attempted to be removed!"
357
346
)
358
347
return job_is_pending
359
348
0 commit comments