Don't break the API when jobs get deleted.

main
Vincent Driessen 13 years ago
parent bd08f24f15
commit c49e564d3c

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

Loading…
Cancel
Save