Sha256: 33ba9b29457e110504ebb6dde6b1674da545b2e8cb9a93130b7cc4a7fc461844
Contents?: true
Size: 685 Bytes
Versions: 8
Compression:
Stored size: 685 Bytes
Contents
module Harness class SidekiqQueue class SendGauge < Job include Sidekiq::Worker sidekiq_options :queue => :metrics def perform(attributes) gauge = Gauge.new attributes log gauge end end class SendCounter < Job include Sidekiq::Worker sidekiq_options :queue => :metrics def perform(attributes) counter = Counter.new attributes log counter end end def push(measurement) if measurement.is_a? Gauge SendGauge.perform_async measurement.attributes elsif measurement.is_a? Counter SendCounter.perform_async measurement.attributes end end end end
Version data entries
8 entries across 8 versions & 1 rubygems