Module: ResqueAdmin::Scheduler::Configuration

Included in:
ResqueAdmin::Scheduler
Defined in:
lib/resque_admin/scheduler/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#app_nameObject



59
60
61
# File 'lib/resque_admin/scheduler/configuration.rb', line 59

def app_name
  @app_name ||= ENV['APP_NAME']
end

#dynamicObject



52
53
54
# File 'lib/resque_admin/scheduler/configuration.rb', line 52

def dynamic
  @dynamic ||= !!ENV['DYNAMIC_SCHEDULE']
end

#envObject



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

#logfileObject



38
39
40
# File 'lib/resque_admin/scheduler/configuration.rb', line 38

def logfile
  @logfile ||= ENV['LOGFILE']
end

#logformatObject



45
46
47
# File 'lib/resque_admin/scheduler/configuration.rb', line 45

def logformat
  @logformat ||= ENV['LOGFORMAT']
end

#poll_sleep_amountObject



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

#quietObject



31
32
33
# File 'lib/resque_admin/scheduler/configuration.rb', line 31

def quiet
  @quiet ||= !!ENV['QUIET']
end

#verboseObject



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

Yields:

  • (_self)

Yield Parameters:



7
8
9
# File 'lib/resque_admin/scheduler/configuration.rb', line 7

def configure
  yield self
end