Skip to content

Commit

Permalink
Don't allow kafka exceptions to cause EmsEvent.add_queue to fail
Browse files Browse the repository at this point in the history
If there are issues publishing events to kafka we shouldn't allow them
to cause the main MiqQueue EmsEvent.add to fail
  • Loading branch information
agrare committed Aug 13, 2020
1 parent 5f2a3a7 commit aab6b9c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/ems_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ def self.publish_event(ems_id, event)
:event => event[:event_type],
:payload => event
)
rescue => err
_log.warn("Failed to publish event [#{ems_id}] [#{event[:event_type]}]: #{err}")
_log.log_backtrace(err)
end

private_class_method :publish_event
Expand Down

0 comments on commit aab6b9c

Please sign in to comment.