def post_request(path, options = {}, &block)
      loop do
        response = self.class.post(path, options, &block)

        if response.code == 400 && response.body =~ /Load in progress/
          # We can't send data too fast, when the previous request is still loaded we
          # have to wait so sleep 10 seconds and try again
          sleep(10)
        elsif response.code == 200
          return
        else
          raise('Bad Post')
        end
      end
    end
def post_request(path, options = {}, &block)
      loop do
        response = self.class.post(path, options, &block)

        if response.code == 400 && response.body =~ /Load in progress/
          # We can't send data too fast, when the previous request is still loaded we
          # have to wait so sleep 10 seconds and try again
          sleep(10)
        elsif response.code == 200
          return
        else
          raise('Bad Post')
        end
      end
    end
debug_output $stdout
 Helper method to post batch request to pvout that retries at the moment we get
 a 400 error back with body containing 'Load in progress'