add debug output for sidekiq on staging

This commit is contained in:
Konstantin Haase 2015-03-31 16:51:30 +02:00
parent b30aa0e8c5
commit 841aaef368

View File

@ -0,0 +1,20 @@
require 'sidekiq'
module Travis::API::V3
module Extensions
module Sidekiq
module Client
def push(item)
Travis.logger.info("Sidekiq job scheduled: #{item.inspect}") if debug_push?
super
end
def debug_push?
Travis.env == 'development'.freeze or Travis.env == 'staging'.freeze
end
end
::Sidekiq::Client.send(:prepend, Client)
end
end
end