Class: LiveEvents::CourseEvent
- Inherits:
-
BaseEvent
- Object
- ActiveJob::Base
- CanvasSync::Job
- BaseEvent
- LiveEvents::CourseEvent
- Defined in:
- lib/canvas_sync/generators/templates/services/live_events/course/course_event.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BaseEvent
Instance Method Summary collapse
-
#perform(event_payload) ⇒ Object
The following is provided in the live events call: { course_id: course.global_id, uuid: course.uuid, account_id: course.global_account_id, name: course.name, created_at: course.created_at, updated_at: course.updated_at, workflow_state: course.workflow_state }.
Methods inherited from BaseEvent
Methods inherited from CanvasSync::Job
#create_job_log, #report_checker_wait_time
Instance Method Details
#perform(event_payload) ⇒ Object
The following is provided in the live events call:
course_id: course.global_id,
uuid: course.uuid,
account_id: course.global_account_id,
name: course.name,
created_at: course.created_at,
updated_at: course.updated_at,
workflow_state: course.workflow_state
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/canvas_sync/generators/templates/services/live_events/course/course_event.rb', line 16 def perform(event_payload) super attrs = { canvas_course_id: local_canvas_id(payload[:course_id]), canvas_account_id: local_canvas_id(payload[:account_id]), long_name: payload[:name], status: payload[:workflow_state], } create_or_update(attrs) end |