Module: ResqueAdmin::Scheduler::Configuration
- Included in:
- ResqueAdmin::Scheduler
- Defined in:
- lib/resque_admin/scheduler/configuration.rb
Instance Attribute Summary collapse
- #app_name ⇒ Object
- #dynamic ⇒ Object
- #env ⇒ Object
- #logfile ⇒ Object
- #logformat ⇒ Object
- #poll_sleep_amount ⇒ Object
- #quiet ⇒ Object
- #verbose ⇒ Object
Instance Method Summary collapse
-
#configure {|_self| ... } ⇒ Object
Allows for block-style configuration.
Instance Attribute Details
#app_name ⇒ Object
59 60 61 |
# File 'lib/resque_admin/scheduler/configuration.rb', line 59 def app_name @app_name ||= ENV['APP_NAME'] end |
#dynamic ⇒ Object
52 53 54 |
# File 'lib/resque_admin/scheduler/configuration.rb', line 52 def dynamic @dynamic ||= !!ENV['DYNAMIC_SCHEDULE'] end |
#env ⇒ Object
14 15 16 17 18 19 |
# File 'lib/resque_admin/scheduler/configuration.rb', line 14 def env return @env if @env @env ||= Rails.env if defined?(Rails) && Rails.respond_to?(:env) @env ||= ENV['RAILS_ENV'] @env end |
#logfile ⇒ Object
38 39 40 |
# File 'lib/resque_admin/scheduler/configuration.rb', line 38 def logfile @logfile ||= ENV['LOGFILE'] end |
#logformat ⇒ Object
45 46 47 |
# File 'lib/resque_admin/scheduler/configuration.rb', line 45 def logformat @logformat ||= ENV['LOGFORMAT'] end |
#poll_sleep_amount ⇒ Object
67 68 69 70 |
# File 'lib/resque_admin/scheduler/configuration.rb', line 67 def poll_sleep_amount @poll_sleep_amount ||= Float(ENV.fetch('RESQUE_SCHEDULER_INTERVAL', '5')) end |
#quiet ⇒ Object
31 32 33 |
# File 'lib/resque_admin/scheduler/configuration.rb', line 31 def quiet @quiet ||= !!ENV['QUIET'] end |
#verbose ⇒ Object
24 25 26 |
# File 'lib/resque_admin/scheduler/configuration.rb', line 24 def verbose @verbose ||= !!ENV['VERBOSE'] end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
Allows for block-style configuration
7 8 9 |
# File 'lib/resque_admin/scheduler/configuration.rb', line 7 def configure yield self end |