Class: LiveEvents::ModuleItemEvent

Inherits:
BaseEvent show all
Defined in:
lib/canvas_sync/generators/templates/services/live_events/module_item_event.rb

Instance Attribute Summary

Attributes inherited from BaseEvent

#metadata, #payload, #raw_payload

Attributes inherited from CanvasSync::Job

#job_log

Instance Method Summary collapse

Methods inherited from BaseEvent

#local_canvas_id, #perform

Methods inherited from CanvasSync::Job

#create_job_log, #report_checker_wait_time, #update_or_create_model

Instance Method Details

#processObject



6
7
8
9
# File 'lib/canvas_sync/generators/templates/services/live_events/module_item_event.rb', line 6

def process
  context_module_item = ContextModuleItem.find_or_initialize_by(canvas_id: payload["module_item_id"])
  context_module_item.sync_from_api
end