Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash on missing job #146

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix crash on missing job
  • Loading branch information
bstriner committed Mar 18, 2018
commit cd254fd7918e3628e3c9736000c70f0e17502cfc
5 changes: 4 additions & 1 deletion jobManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ def __manage(self):
).start()

except Exception as err:
self.jobQueue.makeDead(job.id, str(err))
if job:
self.jobQueue.makeDead(job.id, str(err))
else:
self.log.info("Missing job %d, error: %s" % (id, str(err)))

# Sleep for a bit and then check again
time.sleep(Config.DISPATCH_PERIOD)
Expand Down