devdocs/lib/docs/subscribers/requester_subscriber.rb
2018-11-25 13:17:32 -05:00

13 lines
320 B
Ruby

# frozen_string_literal: true
module Docs
class RequesterSubscriber < Subscriber
self.namespace = 'requester'
def handle_response(event)
if event.duration > 10_000
log "WARN: #{format_url event.payload[:url]} was slow to process (#{(event.duration / 1000).round}s)"
end
end
end
end