mirror of https://github.com/freeCodeCamp/devdocs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
320 B
14 lines
320 B
6 years ago
|
# 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
|