def purge_urls
      @current_job.each do |url|
        begin
          @varnish.start if @varnish.stopped?
          while(!@varnish.running?) do sleep 0.1 end
          if @varnish.purge :url, url
            @logger.info "Purged url: #{url}"
            @purged_urls << url
          else
            @logger.warn "Could not purge: #{url}"
          end
        rescue *ERRORS => e
          @logger.warn "Error on url: #{url}, message: #{e}"
          sleep @timeout
        end
      end
    end
def purge_urls
      @current_job.each do |url|
        begin
          @varnish.start if @varnish.stopped?
          while(!@varnish.running?) do sleep 0.1 end
          if @varnish.purge :url, url
            @logger.info "Purged url: #{url}"
            @purged_urls << url
          else
            @logger.warn "Could not purge: #{url}"
          end
        rescue *ERRORS => e
          @logger.warn "Error on url: #{url}, message: #{e}"
          sleep @timeout
        end
      end
    end
Once a batch is ready the Client fires off purge requests on the list of
 urls.