Class: SolidObserver::Services::StorageInfoSnapshot
- Inherits:
-
Object
- Object
- SolidObserver::Services::StorageInfoSnapshot
show all
- Defined in:
- lib/solid_observer/services/storage_info_snapshot.rb
Defined Under Namespace
Classes: Component, RecordCount
Constant Summary
collapse
- COMPONENTS =
[
Component.new(
key: "queue_observer",
label: "Queue observer",
record_label: "observer events",
model: -> { SolidObserver::QueueEvent },
enabled: -> { SolidObserver.config.solid_queue_enabled? }
),
Component.new(
key: "cache_observer",
label: "Cache observer",
record_label: "observer events",
model: -> { SolidObserver::CacheEvent },
enabled: -> { SolidObserver.config.solid_cache_enabled? }
),
Component.new(
key: "solid_cache",
label: "SolidCache",
record_label: "cache rows",
model: -> { ::SolidCache::Entry },
enabled: -> { SolidObserver.config.solid_cache_enabled? }
),
Component.new(
key: "cable_observer",
label: "Cable telemetry",
record_label: "observer events",
model: -> { SolidObserver::CableEvent },
enabled: -> { SolidObserver.config.solid_cable_enabled? }
),
Component.new(
key: "solid_cable",
label: "Solid Cable messages",
record_label: "messages",
model: -> { ::SolidCable::Message },
enabled: -> { SolidObserver.config.solid_cable_enabled? }
)
].freeze
- CONNECTION_ERRORS =
[
ActiveRecord::ConnectionNotEstablished,
ActiveRecord::StatementInvalid,
*([PG::ConnectionBad] if defined?(PG::ConnectionBad)),
*([Mysql2::Error::ConnectionError] if defined?(Mysql2::Error::ConnectionError)),
*([Trilogy::Error] if defined?(Trilogy::Error)),
*([SQLite3::CantOpenException] if defined?(SQLite3::CantOpenException))
].freeze
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.call ⇒ Object
207
208
209
|
# File 'lib/solid_observer/services/storage_info_snapshot.rb', line 207
def self.call
new.call
end
|
Instance Method Details
#call ⇒ Object
211
212
213
|
# File 'lib/solid_observer/services/storage_info_snapshot.rb', line 211
def call
COMPONENTS.filter_map(&:snapshot)
end
|