Skip to content

Commit

Permalink
Fixed bug with WF logs
Browse files Browse the repository at this point in the history
  • Loading branch information
zagganas committed Jun 3, 2022
1 parent 8175add commit 46abd1d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scheduler_files/workflowMonitorAndClean.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,13 @@ def updateStatus(status, jobid, start=None, stop=None, ram=None, cpu=None):
updateStatus('Error', jobid, start, 'NOW()')


#write logs
logfile=logPath + '/' + 'logs.txt'
g=open(logfile,'w')
for i in range(1,len(taskSteps)):
g.write('>>Step ' + str(i) + ': ' + taskIds[taskSteps[i]] + ' logs\n')
g.write('------------------------\n')
try:
g.write(taskStdout[taskIds[taskSteps[i]]] + '\n')
g.write(taskStdout[taskSteps[i]] + '\n')
except KeyError:
g.write("NOLOG\n")
g.close()
Expand Down

0 comments on commit 46abd1d

Please sign in to comment.