Sha256: abc9c255fa063beb11a5f677a59b66bb447e8fd44f16345fc805969ca461619e
Contents?: true
Size: 620 Bytes
Versions: 42
Compression:
Stored size: 620 Bytes
Contents
module CanvasSync module Jobs class SyncAdminsJob < CanvasSync::Job # Syncs Admins using the Canvas API # # # @param job_chain [Hash] # @param options [Hash] def perform(job_chain, _options) updated_admins = [] CanvasSync.get_canvas_sync_client(job_chain[:global_options]).account_admins("self").all_pages!.each do |admin_params| admin = Admin.create_or_update(admin_params) updated_admins.push(admin.id) end Admin.where.not(id: updated_admins).delete_all CanvasSync.invoke_next(job_chain) end end end end
Version data entries
42 entries across 42 versions & 1 rubygems