@ -155,7 +155,7 @@ class Queue(object):
def fetch_job ( self , job_id ) :
def fetch_job ( self , job_id ) :
try :
try :
job = self . job_class . fetch ( job_id , connection = self . connection )
job = self . job_class . fetch ( job_id , connection = self . connection , serializer = self . serializer )
except NoSuchJobError :
except NoSuchJobError :
self . remove ( job_id )
self . remove ( job_id )
else :
else :
@ -511,7 +511,8 @@ nd
dependent_job for dependent_job
dependent_job for dependent_job
in self . job_class . fetch_many (
in self . job_class . fetch_many (
dependent_job_ids ,
dependent_job_ids ,
connection = self . connection
connection = self . connection ,
serializer = self . serializer
) if dependent_job . dependencies_are_met (
) if dependent_job . dependencies_are_met (
exclude_job_id = job . id ,
exclude_job_id = job . id ,
pipeline = pipe
pipeline = pipe
@ -581,7 +582,7 @@ nd
return None
return None
@classmethod
@classmethod
def dequeue_any ( cls , queues , timeout , connection = None , job_class = None ):
def dequeue_any ( cls , queues , timeout , connection = None , job_class = None , serializer = None ):
""" Class method returning the job_class instance at the front of the given
""" Class method returning the job_class instance at the front of the given
set of Queues , where the order of the queues is important .
set of Queues , where the order of the queues is important .
@ -602,9 +603,10 @@ nd
queue_key , job_id = map ( as_text , result )
queue_key , job_id = map ( as_text , result )
queue = cls . from_queue_key ( queue_key ,
queue = cls . from_queue_key ( queue_key ,
connection = connection ,
connection = connection ,
job_class = job_class )
job_class = job_class ,
serializer = serializer )
try :
try :
job = job_class . fetch ( job_id , connection = connection )
job = job_class . fetch ( job_id , connection = connection , serializer = serializer )
except NoSuchJobError :
except NoSuchJobError :
# Silently pass on jobs that don't exist (anymore),
# Silently pass on jobs that don't exist (anymore),
# and continue in the look
# and continue in the look