Class: SolidObserver::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- SolidObserver::Engine
- Defined in:
- lib/solid_observer/engine.rb
Constant Summary collapse
- SOLID_QUEUE_AVAILABLE =
defined?(::SolidQueue)
- SOLID_CACHE_AVAILABLE =
defined?(::SolidCache)
Class Method Summary collapse
- .activate_subscribers ⇒ Object
- .check_solid_cache_availability ⇒ Object
- .check_solid_queue_availability ⇒ Object
- .check_ui_authentication ⇒ Object
- .configure_database_connection ⇒ Object
Class Method Details
.activate_subscribers ⇒ Object
47 48 49 50 51 52 53 54 |
# File 'lib/solid_observer/engine.rb', line 47 def activate_subscribers return activate_subscribers_in_realtime if SolidObserver.config.realtime_mode? return if activation_skipped_for_table_status_for_enabled_components? Rails.logger.info "[SolidObserver] Activating event subscribers" Subscriber.subscribe! if should_activate_queue_subscriber? CacheSubscriber.subscribe! if should_activate_cache_subscriber? end |
.check_solid_cache_availability ⇒ Object
29 30 31 32 33 34 |
# File 'lib/solid_observer/engine.rb', line 29 def check_solid_cache_availability return if defined?(::SolidCache) return unless SolidObserver.config.observe_cache Rails.logger.warn "[SolidObserver] SolidCache not detected. Cache observability features will be disabled." end |
.check_solid_queue_availability ⇒ Object
23 24 25 26 27 |
# File 'lib/solid_observer/engine.rb', line 23 def check_solid_queue_availability return if defined?(::SolidQueue) Rails.logger.warn "[SolidObserver] SolidQueue not detected. Queue observability features will be limited." end |
.check_ui_authentication ⇒ Object
36 37 38 |
# File 'lib/solid_observer/engine.rb', line 36 def check_ui_authentication Services::UiAuthCheck.call(config: SolidObserver.config) end |
.configure_database_connection ⇒ Object
40 41 42 43 44 45 |
# File 'lib/solid_observer/engine.rb', line 40 def configure_database_connection return if SolidObserver.config.realtime_mode? return unless queue_db_config connect_observer_models end |