Skip to content

Commit

Permalink
Added screen/log output in job.py when errors are encountered in proc…
Browse files Browse the repository at this point in the history
…essing.
  • Loading branch information
Patrick Lazarus committed Apr 13, 2011
1 parent 3b7f294 commit a4bd484
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/python/job.py
Expand Up @@ -140,6 +140,9 @@ def update_jobs_status_from_queue():
# Errors during processing...
errormsg = config.jobpooler.queue_manager.get_errors(submit['queue_id'])

jobpool_cout.outs("Processing of Job #%d (%s) had errors." % \
(submit['job_id'], submit['queue_id']))

# Mark job entry with status 'failed'
# Mark job_submit entry with status 'processing_failed'
queries = []
Expand Down Expand Up @@ -211,6 +214,7 @@ def recover_failed_jobs():
"details='Job will be retried' " \
"WHERE id=%d" % \
(jobtracker.nowstr(), job['id']))
jobpool_cout.outs("Job #%d will be retried." % job['id'])
else:
# We've run out of attempts for this job
if config.email.send_on_terminal_failures or \
Expand All @@ -224,7 +228,11 @@ def recover_failed_jobs():
msg += "\n*** No more attempts for this job. ***\n"
msg += "*** Job will NOT be re-submitted! ***\n"
if config.basic.delete_rawdata:
jobpool_cout.outs("Job #%d will NOT be retried. " \
"Data files will be deleted." % job['id'])
msg += "*** Raw data files will be deleted. ***\n"
else:
jobpool_cout.outs("Job #%d will NOT be retried. " % job['id'])
mailer.ErrorMailer(msg).send()

if config.basic.delete_rawdata:
Expand Down

0 comments on commit a4bd484

Please sign in to comment.