From c155918d6de1a781a3805e6f1e1b6f866c9a3a88 Mon Sep 17 00:00:00 2001 From: glaslos Date: Wed, 18 Feb 2015 15:36:39 +0100 Subject: [PATCH] lrem only first occurrence of the job id (we expect only one) --- rq/queue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rq/queue.py b/rq/queue.py index 3f59a50..988a54e 100644 --- a/rq/queue.py +++ b/rq/queue.py @@ -142,9 +142,9 @@ class Queue(object): job_id = job_or_id.id if isinstance(job_or_id, self.job_class) else job_or_id if pipeline is not None: - pipeline.lrem(self.key, 0, job_id) + pipeline.lrem(self.key, 1, job_id) - return self.connection._lrem(self.key, 0, job_id) + return self.connection._lrem(self.key, 1, job_id) def compact(self): """Removes all "dead" jobs from the queue by cycling through it, while