|
|
@ -40,7 +40,7 @@ class Queue(object):
|
|
|
|
if not queue_key.startswith(prefix):
|
|
|
|
if not queue_key.startswith(prefix):
|
|
|
|
raise ValueError('Not a valid RQ queue key: %s' % (queue_key,))
|
|
|
|
raise ValueError('Not a valid RQ queue key: %s' % (queue_key,))
|
|
|
|
name = queue_key[len(prefix):]
|
|
|
|
name = queue_key[len(prefix):]
|
|
|
|
return Queue(name, connection=connection)
|
|
|
|
return cls(name, connection=connection)
|
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, name='default', default_timeout=None, connection=None):
|
|
|
|
def __init__(self, name='default', default_timeout=None, connection=None):
|
|
|
|
if connection is None:
|
|
|
|
if connection is None:
|
|
|
@ -209,7 +209,7 @@ class Queue(object):
|
|
|
|
if result is None:
|
|
|
|
if result is None:
|
|
|
|
return None
|
|
|
|
return None
|
|
|
|
queue_key, job_id = result
|
|
|
|
queue_key, job_id = result
|
|
|
|
queue = Queue.from_queue_key(queue_key, connection=connection)
|
|
|
|
queue = cls.from_queue_key(queue_key, connection=connection)
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
job = Job.fetch(job_id, connection=connection)
|
|
|
|
job = Job.fetch(job_id, connection=connection)
|
|
|
|
except NoSuchJobError:
|
|
|
|
except NoSuchJobError:
|
|
|
|