Class: Threasy::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/threasy/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



6
7
8
9
10
# File 'lib/threasy/config.rb', line 6

def initialize
  self.max_workers  = 4
  self.max_sleep    = 60.0
  self.max_overdue  = 300.0
end

Instance Attribute Details

#loggerObject



12
13
14
# File 'lib/threasy/config.rb', line 12

def logger
  @logger ||= Logger.new(STDOUT).tap { |l| l.level = Logger::INFO }
end

#max_overdueObject

Returns the value of attribute max_overdue.



3
4
5
# File 'lib/threasy/config.rb', line 3

def max_overdue
  @max_overdue
end

#max_sleepObject

Returns the value of attribute max_sleep.



3
4
5
# File 'lib/threasy/config.rb', line 3

def max_sleep
  @max_sleep
end

#max_workersObject

Returns the value of attribute max_workers.



3
4
5
# File 'lib/threasy/config.rb', line 3

def max_workers
  @max_workers
end

#scheduleObject

Returns the value of attribute schedule.



3
4
5
# File 'lib/threasy/config.rb', line 3

def schedule
  @schedule
end

#workObject

Returns the value of attribute work.



3
4
5
# File 'lib/threasy/config.rb', line 3

def work
  @work
end