mirror of https://github.com/rq/rq.git
Also allow args and kwargs to enqueue() calls on Queue.
This commit is contained in:
parent
159eba6df2
commit
62b6b180f3
|
@ -28,8 +28,8 @@ class Queue(object):
|
|||
def count(self):
|
||||
return conn.llen(self.key)
|
||||
|
||||
def enqueue(self, job):
|
||||
return job.enqueue(self)
|
||||
def enqueue(self, job, *args, **kwargs):
|
||||
return job.enqueue(self, *args, **kwargs)
|
||||
|
||||
def dequeue(self):
|
||||
s = conn.lpop(self.key)
|
||||
|
|
|
@ -157,7 +157,7 @@ class TestJob(RQTestCase):
|
|||
|
||||
q = Queue('alt-queue')
|
||||
self.assertEquals(q.empty, True)
|
||||
q.enqueue(testjob)
|
||||
q.enqueue(testjob, 'Simon')
|
||||
self.assertEquals(q.empty, False)
|
||||
self.assertQueueContains(q, testjob)
|
||||
|
||||
|
|
Loading…
Reference in New Issue