def wait(retries_left, &blk)
      blk.call
    rescue Exception => e
      retries_left -= 1
      if retries_left > 0
        sleep(0.5)
        retry
      else
        raise
      end
    end
def wait(retries_left, &blk)
      blk.call
    rescue Exception => e
      retries_left -= 1
      if retries_left > 0
        sleep(0.5)
        retry
      else
        raise
      end
    end
Do not add retries_left default value