def dequeue_job(self, pilot_url, pilot_url2=None):
        queue_list = []
        queue_name = pilot_url + ":queue"
        queue_list.append(queue_name)
        if pilot_url2!=None:
            queue_name2 = pilot_url2 + ":queue"        
            queue_list.append(queue_name2)
        logger.debug("Dequeue sub-job from: " + str(queue_list))
        #+ " number queued items: " + str(self.redis_client.llen(queue_name)))
        #self.redis_client.set(queue_name + ':last_out', pickle.dumps(datetime.datetime.now()))
        job_url = self.redis_client.brpop(queue_list, timeout=1)
        #job_url = self.redis_client.rpop(queue_name)
        logger.debug("Dequeued: " + str(job_url))
        if job_url==None:
            return job_url
        logger.debug("Dequeued: " + str(job_url))
        return job_url[1]
deque to new job  of a certain pilot
dataset/ETHPy150Open saga-project/BigJob/coordination/bigjob_coordination_redis.py/bigjob_coordination.dequeue_job