Class: SidekiqAlive::Config
- Inherits:
-
Object
- Object
- SidekiqAlive::Config
- Includes:
- Singleton
- Defined in:
- lib/sidekiq_alive/config.rb
Instance Attribute Summary collapse
-
#callback ⇒ Object
Returns the value of attribute callback.
-
#liveness_key ⇒ Object
Returns the value of attribute liveness_key.
-
#port ⇒ Object
Returns the value of attribute port.
-
#registered_instance_key ⇒ Object
Returns the value of attribute registered_instance_key.
-
#time_to_live ⇒ Object
Returns the value of attribute time_to_live.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #set_defaults ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
11 12 13 |
# File 'lib/sidekiq_alive/config.rb', line 11 def initialize set_defaults end |
Instance Attribute Details
#callback ⇒ Object
Returns the value of attribute callback.
5 6 7 |
# File 'lib/sidekiq_alive/config.rb', line 5 def callback @callback end |
#liveness_key ⇒ Object
Returns the value of attribute liveness_key.
5 6 7 |
# File 'lib/sidekiq_alive/config.rb', line 5 def liveness_key @liveness_key end |
#port ⇒ Object
Returns the value of attribute port.
5 6 7 |
# File 'lib/sidekiq_alive/config.rb', line 5 def port @port end |
#registered_instance_key ⇒ Object
Returns the value of attribute registered_instance_key.
5 6 7 |
# File 'lib/sidekiq_alive/config.rb', line 5 def registered_instance_key @registered_instance_key end |
#time_to_live ⇒ Object
Returns the value of attribute time_to_live.
5 6 7 |
# File 'lib/sidekiq_alive/config.rb', line 5 def time_to_live @time_to_live end |
Instance Method Details
#set_defaults ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/sidekiq_alive/config.rb', line 15 def set_defaults @port = ENV['SIDEKIQ_ALIVE_PORT'] || 7433 @liveness_key = 'SIDEKIQ::LIVENESS_PROBE_TIMESTAMP' @time_to_live = 10 * 60 @callback = proc {} @registered_instance_key = "SIDEKIQ_REGISTERED_INSTANCE" end |