Sha256: e6975a63f0067f751b9bf5b10c925605ab8530c0391332abc337aa21e08f614b

Contents?: true

Size: 347 Bytes

Versions: 7

Compression:

Stored size: 347 Bytes

Contents

require_relative "queue_metric_tracker"

module WorkerRoulette
  class QueueDepth
    include ::QueueMetricTracker

    def track(sender, work_orders, remaining)
      return unless enabled?

      if value = calculate_stats(:queue_depth, remaining)
        tracker_send(message("queue_depth", channel(sender), value))
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
nexia_worker_roulette-0.2.9 lib/worker_roulette/queue_depth.rb
nexia_worker_roulette-0.2.8 lib/worker_roulette/queue_depth.rb
nexia_worker_roulette-0.2.7 lib/worker_roulette/queue_depth.rb
nexia_worker_roulette-0.2.6 lib/worker_roulette/queue_depth.rb
nexia_worker_roulette-0.2.5 lib/worker_roulette/queue_depth.rb
nexia_worker_roulette-0.2.4 lib/worker_roulette/queue_depth.rb
nexia_worker_roulette-0.2.3 lib/worker_roulette/queue_depth.rb