Sha256: a83ce2e610c8f5008ded5a41bb593783ce34f8ed3561107120a3cbb69255511f

Contents?: true

Size: 635 Bytes

Versions: 7

Compression:

Stored size: 635 Bytes

Contents

module ActiveHook
  module Server
    class Config < ActiveHook::BaseConfig
      OTHER_DEFAULTS = {
        workers: 2,
        queue_threads: 2,
        retry_threads: 1
      }.freeze

      attr_accessor :workers, :queue_threads, :retry_threads

      def initialize
        super
        OTHER_DEFAULTS.each { |key, value| send("#{key}=", value) }
      end

      def worker_options
        {
          queue_threads: queue_threads,
          retry_threads: retry_threads
        }
      end

      def manager_options
        {
          workers: workers,
          options: worker_options
        }
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
activehook-0.1.9 lib/activehook/server/config.rb
activehook-0.1.8 lib/activehook/server/config.rb
activehook-0.1.7 lib/activehook/server/config.rb
activehook-0.1.6 lib/activehook/server/config.rb
activehook-0.1.5 lib/activehook/server/config.rb
activehook-0.1.4 lib/activehook/server/config.rb
activehook-0.1.3 lib/activehook/server/config.rb