mirror of https://github.com/rq/rq.git
Don't break the API when jobs get deleted.
This commit is contained in:
parent
bd08f24f15
commit
c49e564d3c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue