class SidekiqAlive::Config

Attributes

callback[RW]
custom_liveness_probe[RW]
host[RW]
liveness_key[RW]
path[RW]
port[RW]
queue_prefix[RW]
registered_instance_key[RW]
server[RW]
time_to_live[RW]

Public Class Methods

new() click to toggle source
# File lib/sidekiq_alive/config.rb, line 18
def initialize
  set_defaults
end

Public Instance Methods

registration_ttl() click to toggle source
# File lib/sidekiq_alive/config.rb, line 35
def registration_ttl
  @registration_ttl || time_to_live + 60
end
set_defaults() click to toggle source
# File lib/sidekiq_alive/config.rb, line 22
def set_defaults
  @host = ENV.fetch('SIDEKIQ_ALIVE_HOST', '0.0.0.0')
  @port = ENV.fetch('SIDEKIQ_ALIVE_PORT', 7433)
  @path = ENV.fetch('SIDEKIQ_ALIVE_PATH', '/')
  @liveness_key = 'SIDEKIQ::LIVENESS_PROBE_TIMESTAMP'
  @time_to_live = 10 * 60
  @callback = proc {}
  @registered_instance_key = 'SIDEKIQ_REGISTERED_INSTANCE'
  @queue_prefix = :sidekiq_alive
  @server = ENV.fetch('SIDEKIQ_ALIVE_SERVER', 'webrick')
  @custom_liveness_probe = proc { true }
end