Skip to content

Commit

Permalink
Fixing failure message from client CAF-268
Browse files Browse the repository at this point in the history
  • Loading branch information
cinquo committed Jun 18, 2013
1 parent 95847d6 commit 8f662b2
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/python/CRABClient/Commands/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,24 @@ def __call__(self):
self.logger.info("Task name:\t\t\t%s" % self.cachedinfo['RequestName'])
self.logger.info("Task status:\t\t\t%s" % dictresult['status'])

def logJDefErr(jdef):
"""Printing job def failures if any"""
if jdef['jobdefErrors']:
self.logger.error("%sFailed to inject %s\t%s out of %s:" %(colors.RED, colors.NORMAL,\
jdef['failedJobdefs'], jdef['totalJobdefs']))
for error in jdef['jobdefErrors']:
self.logger.info("\t%s" % error)

#Print the url of the panda monitor
if dictresult['taskFailureMsg']:
self.logger.error("%sError during task injection:%s\t%s" % (colors.RED,colors.NORMAL,dictresult['taskFailureMsg']))
# We might also have more information in the job def errors
logJDefErr(jdef=dictresult)
elif dictresult['jobSetID']:
username = urllib.quote(getUserName(self.logger))
self.logger.info("Panda url:\t\t\thttp://panda.cern.ch/server/pandamon/query?job=*&jobsetID=%s&user=%s" % (dictresult['jobSetID'], username))

if dictresult['jobdefErrors']:
self.logger.error("%sSubmission partially failed:%s\t%s jobgroup not submittet out of %s:" % (colors.RED,\
colors.NORMAL, dictresult['failedJobdefs'], dictresult['totalJobdefs']))
for error in dictresult['jobdefErrors']:
self.logger.info("\t%s" % error)
# We have cases where the job def errors are there but we have a job def id
logJDefErr(jdef=dictresult)

#Print information about jobs
states = dictresult['jobsPerStatus']
Expand Down

0 comments on commit 8f662b2

Please sign in to comment.