From c79a18dc73d6c16931a5b212d0acf6c78627a8a8 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Wed, 7 Dec 2022 13:12:39 -0500 Subject: [PATCH] Update stop_event_monitor_queue_on_change to take changes --- app/models/manageiq/providers/nuage/manager_mixin.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/manageiq/providers/nuage/manager_mixin.rb b/app/models/manageiq/providers/nuage/manager_mixin.rb index bdea3130ec..f13bb7f20b 100644 --- a/app/models/manageiq/providers/nuage/manager_mixin.rb +++ b/app/models/manageiq/providers/nuage/manager_mixin.rb @@ -392,14 +392,14 @@ def verify_amqp_credentials(_options = {}) ManageIQ::Providers::Nuage::NetworkManager::EventCatcher::Stream.test_amqp_connection(event_monitor_options) end - def stop_event_monitor_queue_on_change - if event_monitor_class && !new_record? && (authentications.detect(&:changed?) || endpoints.detect(&:changed?)) + def stop_event_monitor_queue_on_change(_changes) + if event_monitor_class && !new_record? $nuage_log.info("EMS: [#{name}], Credentials or endpoints have changed, stopping Event Monitor. It will be restarted by the WorkerMonitor.") stop_event_monitor_queue end end - def stop_event_monitor_queue_on_credential_change - stop_event_monitor_queue_on_change + def stop_event_monitor_queue_on_credential_change(changes) + stop_event_monitor_queue_on_change(changes) end end