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.



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

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

Instance Attribute Details

#loggerObject



14
15
16
# File 'lib/threasy/config.rb', line 14

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

#max_overdueObject

Returns the value of attribute max_overdue.



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

def max_overdue
  @max_overdue
end

#max_sleepObject

Returns the value of attribute max_sleep.



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

def max_sleep
  @max_sleep
end

#max_workersObject

Returns the value of attribute max_workers.



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

def max_workers
  @max_workers
end

#min_workersObject

Returns the value of attribute min_workers.



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

def min_workers
  @min_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