module ResqueAdmin::Scheduler::Configuration

Attributes

app_name[W]

If set, will append the app name to procline

dynamic[W]

If set, will try to update the schedule in the loop

env[W]

Used in `#load_schedule_job`

logfile[W]

If set, will write messages to the file

logformat[W]

Sets whether to log in 'text' or 'json'

poll_sleep_amount[W]

Amount of time in seconds to sleep between polls of the delayed queue. Defaults to 5

quiet[W]

If set, produces no output

verbose[W]

If true, logs more stuff…

Public Instance Methods

app_name() click to toggle source
# File lib/resque_admin/scheduler/configuration.rb, line 59
def app_name
  @app_name ||= ENV['APP_NAME']
end
configure() { |self| ... } click to toggle source

Allows for block-style configuration

# File lib/resque_admin/scheduler/configuration.rb, line 7
def configure
  yield self
end
dynamic() click to toggle source
# File lib/resque_admin/scheduler/configuration.rb, line 52
def dynamic
  @dynamic ||= !!ENV['DYNAMIC_SCHEDULE']
end
env() click to toggle source
# 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() click to toggle source
# File lib/resque_admin/scheduler/configuration.rb, line 38
def logfile
  @logfile ||= ENV['LOGFILE']
end
logformat() click to toggle source
# File lib/resque_admin/scheduler/configuration.rb, line 45
def logformat
  @logformat ||= ENV['LOGFORMAT']
end
poll_sleep_amount() click to toggle source
# 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() click to toggle source
# File lib/resque_admin/scheduler/configuration.rb, line 31
def quiet
  @quiet ||= !!ENV['QUIET']
end
verbose() click to toggle source
# File lib/resque_admin/scheduler/configuration.rb, line 24
def verbose
  @verbose ||= !!ENV['VERBOSE']
end