Class: SidekiqVigil::Check::SetSize

Inherits:
Base
  • Object
show all
Defined in:
lib/sidekiq_vigil/check/set_size.rb

Direct Known Subclasses

DeadSet, RetrySet

Constant Summary collapse

STATE_TTL =
8 * 24 * 60 * 60

Instance Attribute Summary

Attributes inherited from Base

#api, #clock, #logger, #options, #storage

Instance Method Summary collapse

Methods inherited from Base

#check_name, #execute, #initialize

Constructor Details

This class inherits a constructor from SidekiqVigil::Check::Base

Instance Method Details

#callObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/sidekiq_vigil/check/set_size.rb', line 8

def call
  total = current_size
  value = growth_value(total)
  threshold_result(
    target: "global",
    value:,
    warn: options.fetch(:warn, default_warn),
    critical: options.fetch(:critical, default_critical),
    message: message(total, value),
    metadata: { total: }
  )
end