Sha256: 90f4aacbe9d4d878ba5108123d12a69dbe23a8fc8b8929c37cdb472dd9bcd542
Contents?: true
Size: 500 Bytes
Versions: 8
Compression:
Stored size: 500 Bytes
Contents
module Librato module Rails module Subscribers hooks = %w{enqueue_at enqueue perform_start perform} hooks.each do |hook| ActiveSupport::Notifications.subscribe "#{hook}.active_job" do |*args| event = ActiveSupport::Notifications::Event.new(*args) collector.group 'rails.job' do |c| c.increment hook c.timing "#{hook}.time", event.duration, source: event.payload[:job].class end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems