Sha256: 2a7406c3372a6b431c5819b87f3cd9971175194b8d916ac9194e4735f02b7e13

Contents?: true

Size: 781 Bytes

Versions: 16

Compression:

Stored size: 781 Bytes

Contents

class ProconBypassMan::Procon::PerformanceMeasurement::QueueOverProcess
  extend ProconBypassMan::CanOverProcess

  include Singleton

  attr_reader :distributed_queue

  # @override
  def self.enable?
    ProconBypassMan.config.enable_procon_performance_measurement?
  end

  # @override
  def self.distributed_class
    ProconBypassMan::Procon::PerformanceMeasurement::SpanQueue
  end

  # @override
  def self.socket_file_path
    "/tmp/procon_bypass_man_procon_performance_queue".freeze
  end

  def self.push(value)
    return unless enable?

    instance.distributed_queue.push(value)
  end

  def self.pop
    return unless enable?

    instance.distributed_queue.pop
  end

  def initialize
    @distributed_queue = DRbObject.new_with_uri(self.class.socket_path)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
procon_bypass_man-0.3.12 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.3.11 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.3.10 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.3.9 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.3.8.1 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.3.8 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.3.7 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.3.6 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.3.5 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.3.4 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.3.3.1 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.3.3 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.3.2 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.3.1 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.3.0 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb
procon_bypass_man-0.2.3 lib/procon_bypass_man/procon/performance_measurement/queue_over_process.rb