Don't break the API when jobs get deleted.

This commit is contained in:
Vincent Driessen 2012-02-14 20:12:26 +01:00
parent bd08f24f15
commit c49e564d3c
1 changed files with 2 additions and 0 deletions

View File

@ -61,6 +61,8 @@ class Queue(object):
def safe_fetch(job_id):
try:
job = Job.fetch(job_id)
except NoSuchJobError:
return None
except UnpickleError:
return None
return job