canvas_sync 0.17.23 → 0.17.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/canvas_sync/importers/bulk_importer.rb +1 -1
- data/lib/canvas_sync/job_batches/batch.rb +17 -7
- data/lib/canvas_sync/job_batches/batch_aware_job.rb +7 -7
- data/lib/canvas_sync/job_batches/chain_builder.rb +39 -6
- data/lib/canvas_sync/job_batches/context_hash.rb +4 -0
- data/lib/canvas_sync/job_batches/jobs/concurrent_batch_job.rb +12 -9
- data/lib/canvas_sync/job_batches/jobs/managed_batch_job.rb +62 -25
- data/lib/canvas_sync/job_batches/jobs/serial_batch_job.rb +9 -3
- data/lib/canvas_sync/job_batches/sidekiq/web/helpers.rb +1 -1
- data/lib/canvas_sync/job_batches/sidekiq.rb +7 -7
- data/lib/canvas_sync/jobs/begin_sync_chain_job.rb +11 -1
- data/lib/canvas_sync/jobs/sync_terms_job.rb +1 -17
- data/lib/canvas_sync/jobs/term_batches_job.rb +50 -0
- data/lib/canvas_sync/version.rb +1 -1
- data/lib/canvas_sync.rb +31 -8
- data/spec/canvas_sync/processors/provisioning_report_processor_spec.rb +13 -1
- data/spec/dummy/log/test.log +31707 -0
- data/spec/job_batching/batch_aware_job_spec.rb +3 -3
- data/spec/job_batching/batch_spec.rb +1 -1
- data/spec/job_batching/sidekiq_spec.rb +2 -2
- data/spec/support/fixtures/reports/users.csv +3 -2
- data/spec/support/fixtures/reports/xlist.csv +1 -1
- metadata +3 -2
@@ -66,10 +66,10 @@ RSpec.describe CanvasSync::JobBatches::BatchAwareJob do
|
|
66
66
|
let(:bid) { 'SAMPLEBID' }
|
67
67
|
|
68
68
|
before do
|
69
|
-
Thread.current[
|
70
|
-
Thread.current[
|
69
|
+
Thread.current[CanvasSync::JobBatches::CURRENT_BATCH_THREAD_KEY] = CanvasSync::JobBatches::Batch.new(bid)
|
70
|
+
Thread.current[CanvasSync::JobBatches::CURRENT_BATCH_THREAD_KEY].instance_variable_set(:@open, true)
|
71
71
|
end
|
72
|
-
after { Thread.current[
|
72
|
+
after { Thread.current[CanvasSync::JobBatches::CURRENT_BATCH_THREAD_KEY] = nil }
|
73
73
|
|
74
74
|
it 'yields' do
|
75
75
|
expect {
|
@@ -70,7 +70,7 @@ RSpec.describe CanvasSync::JobBatches::Batch do
|
|
70
70
|
it 'sets Thread.current bid' do
|
71
71
|
batch = CanvasSync::JobBatches::Batch.new
|
72
72
|
batch.jobs do
|
73
|
-
expect(Thread.current[
|
73
|
+
expect(Thread.current[CanvasSync::JobBatches::CURRENT_BATCH_THREAD_KEY]).to eq(batch)
|
74
74
|
end
|
75
75
|
end
|
76
76
|
end
|
@@ -57,8 +57,8 @@ RSpec.describe CanvasSync::JobBatches::Sidekiq do
|
|
57
57
|
context 'when in batch' do
|
58
58
|
let(:bid) { 'SAMPLEBID' }
|
59
59
|
let(:jid) { 'SAMPLEJID' }
|
60
|
-
before { Thread.current[
|
61
|
-
after { Thread.current[
|
60
|
+
before { Thread.current[CanvasSync::JobBatches::CURRENT_BATCH_THREAD_KEY] = CanvasSync::JobBatches::Batch.new(bid) }
|
61
|
+
after { Thread.current[CanvasSync::JobBatches::CURRENT_BATCH_THREAD_KEY] = nil }
|
62
62
|
|
63
63
|
it 'yields' do
|
64
64
|
yielded = false
|
@@ -1,4 +1,5 @@
|
|
1
1
|
canvas_user_id,user_id,integration_id,authentication_provider_id,login_id,first_name,last_name,full_name,sortable_name,short_name,email,status,created_by_sis
|
2
2
|
1,sis_id_1,,123,spiderdude1337,Patches,the Spider,Patches the Spider,"the Spider, Patches",,poorbastard@yharnam.com,active,FALSE
|
3
|
-
2
|
4
|
-
2,sis_id_2,,1234,retireddude110,Hunter,Djura,Hunter Djura,"Djura, Hunter",,dreamer@yharnam.com,active,FALSE
|
3
|
+
2,,,1234,retireddude109,Hunter,Djura,Hunter Djura,"Djura, Hunter",,dreamer@yharnam.com,active,FALSE
|
4
|
+
2,sis_id_2,,1234,retireddude110,Hunter,Djura,Hunter Djura,"Djura, Hunter",,dreamer@yharnam.com,active,FALSE
|
5
|
+
2,,,1234,retireddude110,Hunter,Djura,Hunter Djura,"Djura, Hunter",,dreamer@yharnam.com,active,FALSE
|
@@ -1,2 +1,2 @@
|
|
1
1
|
canvas_xlist_course_id,xlist_course_id,canvas_section_id,section_id,status,canvas_nonxlist_course_id,nonxlist_course_id
|
2
|
-
|
2
|
+
2,sis_course_1,2,sis_section_2,active,3,sis_course_3
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: canvas_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nate Collings
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -476,6 +476,7 @@ files:
|
|
476
476
|
- lib/canvas_sync/jobs/sync_simple_table_job.rb
|
477
477
|
- lib/canvas_sync/jobs/sync_submissions_job.rb
|
478
478
|
- lib/canvas_sync/jobs/sync_terms_job.rb
|
479
|
+
- lib/canvas_sync/jobs/term_batches_job.rb
|
479
480
|
- lib/canvas_sync/misc_helper.rb
|
480
481
|
- lib/canvas_sync/processors/assignment_groups_processor.rb
|
481
482
|
- lib/canvas_sync/processors/assignments_processor.rb
|