From c49e564d3cb98155c6277f931a998b19736cc699 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Tue, 14 Feb 2012 20:12:26 +0100 Subject: [PATCH] Don't break the API when jobs get deleted. --- rq/queue.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rq/queue.py b/rq/queue.py index a006071..eda26ed 100644 --- a/rq/queue.py +++ b/rq/queue.py @@ -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