Sha256: 9dd7d66004b1c1fa1798ff4c0ca5ac23dbae5a20b0948f9e17f83e93c8e3fcf2
Contents?: true
Size: 605 Bytes
Versions: 42
Compression:
Stored size: 605 Bytes
Contents
module CanvasSync module Jobs class SyncRolesJob < CanvasSync::Job # Syncs Roles using the Canvas API # # # @param job_chain [Hash] # @param options [Hash] def perform(job_chain, _options) updated_roles = [] CanvasSync.get_canvas_sync_client(job_chain[:global_options]).list_roles("self").all_pages!.each do |role_params| role = Role.create_or_update(role_params) updated_roles.push(role.id) end Role.where.not(id: updated_roles).delete_all CanvasSync.invoke_next(job_chain) end end end end
Version data entries
42 entries across 42 versions & 1 rubygems