canvas_sync 0.17.0.beta10 → 0.17.0.beta11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6d329899fbeae89b111e225d044250383eb6f4a0547c0883e0ff555a331f5f3
|
4
|
+
data.tar.gz: ab87348b3d757fbb6acacdf7b7118f7a8da4f290643b34cc7bf0dcdc01f9d109
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9090f7b6058736f5b012d1c1bda245a100a9fbe3eb89eb27f27ba29fefcb3f4d36e464315186acf13dbc298b17d6b3d634e7a2ba5fedd086c31fefa94ef70224
|
7
|
+
data.tar.gz: ac4f18e914e1310cc74d209620b97af398c86e22f6c48220e1d3ae15dbb4ab483480ae4ee9e34ad8eb964cdd2bdfb1355dc2cdd142eef59e3d5297f34bae78f8
|
@@ -126,8 +126,6 @@ module CanvasSync
|
|
126
126
|
|
127
127
|
job_queue = @ready_to_queue = []
|
128
128
|
|
129
|
-
puts "Beginning Batch #{bid}"
|
130
|
-
|
131
129
|
begin
|
132
130
|
parent = Thread.current[:batch]
|
133
131
|
Thread.current[:batch] = self
|
@@ -373,19 +371,19 @@ module CanvasSync
|
|
373
371
|
|
374
372
|
def cleanup_redis(bid)
|
375
373
|
logger.debug {"Cleaning redis of batch #{bid}"}
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
374
|
+
redis do |r|
|
375
|
+
r.del(
|
376
|
+
"BID-#{bid}",
|
377
|
+
"BID-#{bid}-callbacks-complete",
|
378
|
+
"BID-#{bid}-callbacks-success",
|
379
|
+
"BID-#{bid}-failed",
|
380
|
+
|
381
|
+
"BID-#{bid}-batches-success",
|
382
|
+
"BID-#{bid}-batches-complete",
|
383
|
+
"BID-#{bid}-batches-failed",
|
384
|
+
"BID-#{bid}-jids",
|
385
|
+
)
|
386
|
+
end
|
389
387
|
end
|
390
388
|
|
391
389
|
def redis(*args, &blk)
|
@@ -35,7 +35,7 @@ module CanvasSync
|
|
35
35
|
protected
|
36
36
|
|
37
37
|
def merge_report_params(options={}, params={}, term_scope: true)
|
38
|
-
term_scope = batch_context[:canvas_term_id] if term_scope == true
|
38
|
+
term_scope = options[:canvas_term_id] || batch_context[:canvas_term_id] if term_scope == true
|
39
39
|
if term_scope.present?
|
40
40
|
params[:enrollment_term_id] = term_scope
|
41
41
|
end
|
@@ -43,6 +43,7 @@ module CanvasSync
|
|
43
43
|
params[:updated_after] = updated_after
|
44
44
|
end
|
45
45
|
params.merge!(options[:report_params]) if options[:report_params].present?
|
46
|
+
params.merge!(options[:report_parameters]) if options[:report_parameters].present?
|
46
47
|
{ parameters: params }
|
47
48
|
end
|
48
49
|
|
@@ -1,23 +1,8 @@
|
|
1
1
|
module CanvasSync
|
2
2
|
module Jobs
|
3
3
|
# ActiveJob class that starts a Canvas provisioning report
|
4
|
-
class SyncProvisioningReportJob <
|
4
|
+
class SyncProvisioningReportJob < ReportStarter
|
5
5
|
def perform(options)
|
6
|
-
start_report(report_params(options), options)
|
7
|
-
end
|
8
|
-
|
9
|
-
protected
|
10
|
-
|
11
|
-
def start_report(report_params, options)
|
12
|
-
CanvasSync::Jobs::ReportStarter.perform_later(
|
13
|
-
"proservices_provisioning_csv",
|
14
|
-
report_params,
|
15
|
-
CanvasSync::Processors::ProvisioningReportProcessor.to_s,
|
16
|
-
options,
|
17
|
-
)
|
18
|
-
end
|
19
|
-
|
20
|
-
def report_params(options, canvas_term_id = options[:canvas_term_id] || batch_context[:canvas_term_id])
|
21
6
|
params = {
|
22
7
|
include_deleted: true,
|
23
8
|
}
|
@@ -28,11 +13,12 @@ module CanvasSync
|
|
28
13
|
params[model] = true
|
29
14
|
end
|
30
15
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
16
|
+
super(
|
17
|
+
"proservices_provisioning_csv",
|
18
|
+
merge_report_params(options, params, {}),
|
19
|
+
CanvasSync::Processors::ProvisioningReportProcessor.to_s,
|
20
|
+
options,
|
21
|
+
)
|
36
22
|
end
|
37
23
|
end
|
38
24
|
end
|
data/lib/canvas_sync/version.rb
CHANGED