Retuns the next job in the queue, or None if is nothing there

def next_job(self, timeout_seconds=None):
    """Retuns the next job in the queue, or None if is nothing there
    """
    if timeout_seconds is not None:
      timeout = timeout_seconds
    else:
      timeout = BLOCK_SECONDS

    response = self.lua_next(keys=[self.queue_name])
    if not response:
      return

    job = Job.from_serialized(response)
    if not job:
      self.log.warn("could not deserialize job from: %s", serialized_job)
    return job