code: def work_wait(self):
          
  
          if len(self.queues_with_notify) > 0:
              # https://github.com/antirez/redis/issues/874
              connections.redis.blpop(*(self.queues_with_notify + [max(1, int(self.config["max_latency"]))]))
          else:
              gevent.sleep(self.config["max_latency"])
docs: Wait for new jobs to arrive