Sha256: 465e7c806f1d8b3f193897b270e0cf655b227d55cdbc3ebbc19ca4dc1578c8dd

Contents?: true

Size: 432 Bytes

Versions: 25

Compression:

Stored size: 432 Bytes

Contents

# <%= autogenerated_event_warning %>

module LiveEvents
  class BaseEvent < CanvasSync::Job
    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
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
canvas_sync-0.9.4 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.9.3 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.9.2 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.9.1 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.9.0 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.8.4 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.8.3 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.8.2 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.8.1 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.8.0 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.7.3 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.7.2 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.7.1 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.7.0 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.6.4 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.6.3 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.6.2 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.6.1 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.6.0 lib/canvas_sync/generators/templates/services/live_events/base_event.rb
canvas_sync-0.5.4 lib/canvas_sync/generators/templates/services/live_events/base_event.rb