Sha256: ff66a0b49d875a524fa55f5064e299112ead2a8a1fc3651655fe4924797e2534

Contents?: true

Size: 597 Bytes

Versions: 19

Compression:

Stored size: 597 Bytes

Contents

<%= autogenerated_event_warning %>

class LiveEvents::BaseEvent

  attr_accessor :payload

  def perform(event_payload)
    @payload = HashWithIndifferentAccess.new(event_payload['body'])
  end

  # Live events will use a canvas global ID (cross shard) for any ID's provided. This method will return the local ID.
  def local_canvas_id(id)
    id.to_i % 10_000_000_000_000
  end

  def log_error(e)
    Rails.logger.error "Error processing Live Event: #{self.class.name}"
    Rails.logger.error "#{payload}"
    Rails.logger.error e.message
    Rails.logger.error e.backtrace.join("\n")
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
canvas_sync-0.3.23 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.22 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.21 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.20 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.19 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.18 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.17 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.16 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.15 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.14 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.13 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.12 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.11 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.10 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.9 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.8 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.7 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.6 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.3.5 lib/canvas_sync/generators/templates/services/live_events/base_event.rb