Skip to content

Commit

Permalink
Update stop_event_monitor_queue_on_change to take changes
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Jun 19, 2023
1 parent 24aeaae commit bec36c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/models/manageiq/providers/nuage/manager_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bec36c7

Please sign in to comment.