Class: LiveEvents::ModuleEvent
- Inherits:
-
BaseEvent
- Object
- ActiveJob::Base
- CanvasSync::Job
- BaseEvent
- LiveEvents::ModuleEvent
- Defined in:
- lib/canvas_sync/generators/templates/services/live_events/module_event.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BaseEvent
#metadata, #payload, #raw_payload
Attributes inherited from CanvasSync::Job
Instance Method Summary collapse
Methods inherited from BaseEvent
Methods inherited from CanvasSync::Job
#create_job_log, #report_checker_wait_time, #update_or_create_model
Instance Method Details
#process ⇒ Object
6 7 8 9 10 |
# File 'lib/canvas_sync/generators/templates/services/live_events/module_event.rb', line 6 def process return unless payload["context_type"] == "Course" context_module = ContextModule.find_or_initialize_by(canvas_id: payload["module_id"]) context_module.sync_from_api end |