Class: CanvasSync::LiveEvents::BaseHandler
- Defined in:
- lib/canvas_sync/live_events/base_handler.rb
Overview
Deprecated
Direct Known Subclasses
LiveEvents::AssignmentEvent, LiveEvents::AssignmentGroupEvent, LiveEvents::CourseEvent, LiveEvents::CourseSectionEvent, LiveEvents::EnrollmentEvent, LiveEvents::GradeEvent, LiveEvents::ModuleEvent, LiveEvents::ModuleItemEvent, LiveEvents::SubmissionEvent, LiveEvents::SyllabusEvent, LiveEvents::UserEvent
Instance Attribute Summary collapse
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#raw_payload ⇒ Object
Returns the value of attribute raw_payload.
Attributes inherited from Job
Instance Method Summary collapse
Methods inherited from Job
#create_job_log, #report_checker_wait_time, #update_or_create_model
Instance Attribute Details
#metadata ⇒ Object
Returns the value of attribute metadata.
8 9 10 |
# File 'lib/canvas_sync/live_events/base_handler.rb', line 8 def @metadata end |
#payload ⇒ Object
Returns the value of attribute payload.
7 8 9 |
# File 'lib/canvas_sync/live_events/base_handler.rb', line 7 def payload @payload end |
#raw_payload ⇒ Object
Returns the value of attribute raw_payload.
6 7 8 |
# File 'lib/canvas_sync/live_events/base_handler.rb', line 6 def raw_payload @raw_payload end |
Instance Method Details
#perform(event_payload) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/canvas_sync/live_events/base_handler.rb', line 10 def perform(event_payload) @raw_payload = event_payload @metadata = HashWithIndifferentAccess.new(event_payload["metadata"]) @payload = HashWithIndifferentAccess.new(event_payload["body"]) process_with_retry end |