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

main
glaslos 10 years ago
parent a1a89217ea
commit c155918d6d

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

Loading…
Cancel
Save