Sha256: c1d34e7ea96433ce400fb497d4e778a66c6db710190391f046492de133d1aff8
Contents?: true
Size: 811 Bytes
Versions: 22
Compression:
Stored size: 811 Bytes
Contents
module CanvasSync::LiveEvents class ProcessEventJob < ::CanvasSync::Job def perform(event) event = event.with_indifferent_access # Support Legacy-Style Event Handlers begin legacy_handler = "LiveEvents::#{event['metadata']['event_name'].camelcase}Event".constantize legacy_handler.perform_later(event) return rescue LoadError, NameError => e Rails.logger.error("Error accessing legacy-style LiveEvents handler #{e}, #{event}") end handlers = CanvasSync::LiveEvents.registered_handlers handlers.each do |h| h.call(event) rescue => e throw e if Rails.env.test? Rails.logger.error("LiveEvent Handler raised Error: #{e}") Raven.captureException(e) if defined? Raven end end end end
Version data entries
22 entries across 22 versions & 1 rubygems