Sha256: 86f68ecacd0a8faaf1755e67607b12ed1f039d65f5eaae3507f516ffe00cff20

Contents?: true

Size: 359 Bytes

Versions: 11

Compression:

Stored size: 359 Bytes

Contents

# frozen_string_literal: true

module Yabeda
  module Sidekiq
    # Client middleware to count number of enqueued jobs
    class ClientMiddleware
      def call(worker, job, queue, _redis_pool)
        labels = Yabeda::Sidekiq.labelize(worker, job, queue)
        Yabeda.sidekiq_jobs_enqueued_total.increment(labels)
        yield
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
yabeda-sidekiq-0.9.0 lib/yabeda/sidekiq/client_middleware.rb
yabeda-sidekiq-0.8.2 lib/yabeda/sidekiq/client_middleware.rb
yabeda-sidekiq-0.8.1 lib/yabeda/sidekiq/client_middleware.rb
yabeda-sidekiq-0.8.0 lib/yabeda/sidekiq/client_middleware.rb
yabeda-sidekiq-0.7.0 lib/yabeda/sidekiq/client_middleware.rb
yabeda-sidekiq-0.6.0 lib/yabeda/sidekiq/client_middleware.rb
yabeda-sidekiq-0.5.0 lib/yabeda/sidekiq/client_middleware.rb
yabeda-sidekiq-0.2.0 lib/yabeda/sidekiq/client_middleware.rb
yabeda-sidekiq-0.1.4 lib/yabeda/sidekiq/client_middleware.rb
yabeda-sidekiq-0.1.3 lib/yabeda/sidekiq/client_middleware.rb
yabeda-sidekiq-0.1.2 lib/yabeda/sidekiq/client_middleware.rb