File: configuration.rb

package info (click to toggle)
ruby-beaneater 1.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 296 kB
  • sloc: ruby: 1,628; sh: 4; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 777 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class Beaneater
  class Configuration
    attr_accessor :default_put_delay   # default delay value to put a job
    attr_accessor :default_put_pri     # default priority value to put a job
    attr_accessor :default_put_ttr     # default ttr value to put a job
    attr_accessor :job_parser          # default job_parser to parse job body
    attr_accessor :job_serializer      # default serializer for job body
    attr_accessor :beanstalkd_url      # default beanstalkd url

    def initialize
      @default_put_delay   = 0
      @default_put_pri     = 65536
      @default_put_ttr     = 120
      @job_parser          = lambda { |body| body }
      @job_serializer      = lambda { |body| body }
      @beanstalkd_url      = nil
    end
  end # Configuration
end # Beaneater