diff --git a/src/api/app/models/update_notification_events.rb b/src/api/app/models/update_notification_events.rb index e6ec1c07579..e33b2f57ef4 100644 --- a/src/api/app/models/update_notification_events.rb +++ b/src/api/app/models/update_notification_events.rb @@ -14,20 +14,8 @@ def create_events e.elements('data') do |d| data[d['key']] = d['_content'] end - retries = 10 - begin - event = Event::Factory.new_from_type(type, data) - event.save! - rescue ActiveRecord::StatementInvalid => e - retries -= 1 - if retries.positive? - Airbrake.notify("Failed to create Event : #{type.inspect}: #{data} #{e}") - retry - end - Airbrake.notify("Failed to create Event : #{type.inspect}: #{data} #{e}") - rescue StandardError => e - Airbrake.notify("Failed to create Event : #{type.inspect}: #{data} #{e}") - end + event = Event::Factory.new_from_type(type, data) + event.save! end end