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):
|
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…
Reference in New Issue