lrem only first occurrence of the job id (we expect only one)

This commit is contained in:
glaslos 2015-02-18 15:36:39 +01:00
parent a1a89217ea
commit c155918d6d
1 changed files with 2 additions and 2 deletions

View File

@ -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