Sha256: 6cc65c0b3ef05dbbd24dd606795f3b32ad488a2641eecfcecb155f5d45c47fb0

Contents?: true

Size: 329 Bytes

Versions: 62

Compression:

Stored size: 329 Bytes

Contents

module Workarea
  module Monitoring
    class SidekiqQueueSizeCheck

      def check
        length = Sidekiq::Queue.all.sum(&:size)
        status = length < Workarea.config.sidekiq_critical_queue_size

        [status, "#{status ? 'Low' : 'High'} - #{length}"]

      rescue
        [false, 'Down']
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.5.26 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.4.45 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.5.25 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.5.23 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.4.44 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.5.22 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.4.43 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.5.21 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.4.42 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.5.20 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.4.41 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.5.19 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.4.40 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.5.18 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.4.39 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.5.17 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.4.38 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.5.16 lib/workarea/monitoring/sidekiq_queue_size_check.rb
workarea-core-3.4.37 lib/workarea/monitoring/sidekiq_queue_size_check.rb