Class: Threasy::Config
- Inherits:
-
Object
- Object
- Threasy::Config
- Defined in:
- lib/threasy/config.rb
Instance Attribute Summary collapse
- #logger ⇒ Object
-
#max_overdue ⇒ Object
Returns the value of attribute max_overdue.
-
#max_sleep ⇒ Object
Returns the value of attribute max_sleep.
-
#max_workers ⇒ Object
Returns the value of attribute max_workers.
-
#schedule ⇒ Object
Returns the value of attribute schedule.
-
#work ⇒ Object
Returns the value of attribute work.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
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
#logger ⇒ Object
12 13 14 |
# File 'lib/threasy/config.rb', line 12 def logger @logger ||= Logger.new(STDOUT).tap { |l| l.level = Logger::INFO } end |
#max_overdue ⇒ Object
Returns the value of attribute max_overdue.
3 4 5 |
# File 'lib/threasy/config.rb', line 3 def max_overdue @max_overdue end |
#max_sleep ⇒ Object
Returns the value of attribute max_sleep.
3 4 5 |
# File 'lib/threasy/config.rb', line 3 def max_sleep @max_sleep end |
#max_workers ⇒ Object
Returns the value of attribute max_workers.
3 4 5 |
# File 'lib/threasy/config.rb', line 3 def max_workers @max_workers end |
#schedule ⇒ Object
Returns the value of attribute schedule.
3 4 5 |
# File 'lib/threasy/config.rb', line 3 def schedule @schedule end |
#work ⇒ Object
Returns the value of attribute work.
3 4 5 |
# File 'lib/threasy/config.rb', line 3 def work @work end |