canvas_sync 0.17.8.beta4 → 0.17.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/initializers/apartment.rb +1 -1
- data/lib/canvas_sync.rb +1 -0
- data/lib/canvas_sync/batch_processor.rb +41 -0
- data/lib/canvas_sync/engine.rb +43 -0
- data/lib/canvas_sync/importers/bulk_importer.rb +73 -12
- data/lib/canvas_sync/job.rb +2 -0
- data/lib/canvas_sync/job_batches/batch_aware_job.rb +2 -1
- data/lib/canvas_sync/job_batches/callback.rb +0 -2
- data/lib/canvas_sync/job_batches/sidekiq.rb +1 -1
- data/lib/canvas_sync/job_batches/sidekiq/web/views/_jobs_table.erb +19 -0
- data/lib/canvas_sync/job_batches/sidekiq/web/views/batch.erb +1 -1
- data/lib/canvas_sync/jobs/report_checker.rb +29 -1
- data/lib/canvas_sync/version.rb +1 -1
- data/spec/dummy/log/test.log +25379 -0
- data/spec/job_batching/batch_spec.rb +4 -4
- data/spec/spec_helper.rb +2 -1
- metadata +36 -6
@@ -168,7 +168,7 @@ RSpec.describe CanvasSync::JobBatches::Batch do
|
|
168
168
|
CanvasSync::JobBatches::Batch.process_failed_job(bid, 'failed-job-id')
|
169
169
|
CanvasSync::JobBatches::Batch.process_failed_job(bid, failed_jid)
|
170
170
|
failed = CanvasSync::JobBatches::Batch.redis { |r| r.smembers("BID-#{bid}-failed") }
|
171
|
-
expect(failed).to
|
171
|
+
expect(failed).to contain_exactly('xxx', 'failed-job-id')
|
172
172
|
end
|
173
173
|
end
|
174
174
|
end
|
@@ -440,10 +440,10 @@ RSpec.describe CanvasSync::JobBatches::Batch do
|
|
440
440
|
|
441
441
|
expect(Sidekiq::Client).to receive(:push_bulk).with(
|
442
442
|
'class' => Sidekiq::Batch::Callback.worker_class,
|
443
|
-
'args' =>
|
443
|
+
'args' => array_including(
|
444
|
+
['SampleCallback', event.to_s, opts, batch.bid, nil],
|
444
445
|
['SampleCallback2', event.to_s, opts2, batch.bid, nil],
|
445
|
-
|
446
|
-
],
|
446
|
+
),
|
447
447
|
'queue' => 'default'
|
448
448
|
)
|
449
449
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
ENV["RAILS_ENV"] ||= 'test'
|
2
|
+
ENV['REDIS_URL'] ||= 'redis://localhost:6379/9'
|
3
|
+
|
2
4
|
require "canvas_sync"
|
3
5
|
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
4
6
|
# Rails::Generators.invoke("canvas_sync:install", ["--models", "all"], destination_root: Rails.root)
|
@@ -19,7 +21,6 @@ Sidekiq::Testing.server_middleware do |chain|
|
|
19
21
|
chain.add CanvasSync::JobBatches::Sidekiq::ServerMiddleware
|
20
22
|
end
|
21
23
|
|
22
|
-
require 'fakeredis/rspec'
|
23
24
|
Dir[File.dirname(__FILE__) + "/job_batching/support/**/*.rb"].each {|f| require f }
|
24
25
|
|
25
26
|
ActiveRecord::Migration.maintain_test_schema!
|
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.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nate Collings
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.17'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.17'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "<"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '6.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "<"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '6.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rake
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -332,6 +346,20 @@ dependencies:
|
|
332
346
|
- - ">="
|
333
347
|
- !ruby/object:Gem::Version
|
334
348
|
version: '0'
|
349
|
+
- !ruby/object:Gem::Dependency
|
350
|
+
name: chronic_duration
|
351
|
+
requirement: !ruby/object:Gem::Requirement
|
352
|
+
requirements:
|
353
|
+
- - ">="
|
354
|
+
- !ruby/object:Gem::Version
|
355
|
+
version: '0'
|
356
|
+
type: :runtime
|
357
|
+
prerelease: false
|
358
|
+
version_requirements: !ruby/object:Gem::Requirement
|
359
|
+
requirements:
|
360
|
+
- - ">="
|
361
|
+
- !ruby/object:Gem::Version
|
362
|
+
version: '0'
|
335
363
|
description:
|
336
364
|
email:
|
337
365
|
- ncollings@instructure.com
|
@@ -353,6 +381,7 @@ files:
|
|
353
381
|
- db/migrate/20201030210836_add_full_sync_to_canvas_sync_sync_batch.rb
|
354
382
|
- lib/canvas_sync.rb
|
355
383
|
- lib/canvas_sync/api_syncable.rb
|
384
|
+
- lib/canvas_sync/batch_processor.rb
|
356
385
|
- lib/canvas_sync/class_callback_executor.rb
|
357
386
|
- lib/canvas_sync/concerns/account/ancestry.rb
|
358
387
|
- lib/canvas_sync/concerns/api_syncable.rb
|
@@ -426,6 +455,7 @@ files:
|
|
426
455
|
- lib/canvas_sync/job_batches/sidekiq/web.rb
|
427
456
|
- lib/canvas_sync/job_batches/sidekiq/web/helpers.rb
|
428
457
|
- lib/canvas_sync/job_batches/sidekiq/web/views/_batches_table.erb
|
458
|
+
- lib/canvas_sync/job_batches/sidekiq/web/views/_jobs_table.erb
|
429
459
|
- lib/canvas_sync/job_batches/sidekiq/web/views/_pagination.erb
|
430
460
|
- lib/canvas_sync/job_batches/sidekiq/web/views/batch.erb
|
431
461
|
- lib/canvas_sync/job_batches/sidekiq/web/views/batches.erb
|
@@ -645,9 +675,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
645
675
|
version: '0'
|
646
676
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
647
677
|
requirements:
|
648
|
-
- - "
|
678
|
+
- - ">="
|
649
679
|
- !ruby/object:Gem::Version
|
650
|
-
version:
|
680
|
+
version: '0'
|
651
681
|
requirements: []
|
652
682
|
rubygems_version: 3.0.3
|
653
683
|
signing_key:
|