Sha256: ce09fcb8c850ac532797aa9a3b7f322cb4de89d454a90664a48e04b2b8ffd506
Contents?: true
Size: 929 Bytes
Versions: 16
Compression:
Stored size: 929 Bytes
Contents
require 'determinator/tracking' module Determinator module Tracking module Sidekiq class Middleware # @param [Object] worker the worker instance # @param [Hash] job the full job payload # * @see https://github.com/mperham/sidekiq/wiki/Job-Format # @param [String] queue the name of the queue the job was pulled from # @yield the next middleware in the chain or worker `perform` method # @return [Void] def call(worker, job, queue) begin Determinator::Tracking.start!(:sidekiq) yield rescue => ex error = true raise ensure Determinator::Tracking.finish!( endpoint: Determinator::Tracking.collect_endpoint_info(worker.class.name), queue: queue, error: !!error ) end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems