Sha256: 85729cee768d91a9dd96f32365036b43a96cf5561d8ffacc404c15c70deafe0a

Contents?: true

Size: 359 Bytes

Versions: 1

Compression:

Stored size: 359 Bytes

Contents

require 'vizsla/background_timer'
require 'vizsla/puppet_master'

if defined? ::ActiveJob::Base
  ::ActiveJob::Base.around_perform do |job, block|
    @vizsla_timer = ::Vizsla::BackgroundTimer.new job.class.name.split('::').last
    @vizsla_timer.start!

    block.call

    @vizsla_timer.stop!
    ::Vizsla::PuppetMaster.new(@vizsla_timer).process
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tracebin-0.0.7 lib/vizsla/background_job_instrumentation/active_job.rb