Skip to content

Commit

Permalink
Merge pull request #20440 from agrare/catch_exceptions_publishing_eve…
Browse files Browse the repository at this point in the history
…nts_to_kafka

Don't allow kafka exceptions to cause EmsEvent.add_queue to fail

(cherry picked from commit eb7d827)
  • Loading branch information
chessbyte authored and simaishi committed Aug 17, 2020
1 parent 14508c7 commit f30e55d
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 @@ -264,6 +264,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 f30e55d

Please sign in to comment.