canvas_sync 0.18.6 → 0.18.8
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: 33a5018a59c29aa95670c467beba015277c9991bc7767987ea6f29f1444f18fa
|
4
|
+
data.tar.gz: 585cb02b25db814d71f4b6626142e3b85965f6bdcf7547cf879f0094cfc3dad2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0618fa0863292e0b97a68d237037583d61da3e40c1f9ae4596b3f1198fc9d664ff49f9dc5d8eabc2c397dc84d7753bbed30a7cabda5b4588e1fbb89bbdb1d854'
|
7
|
+
data.tar.gz: 0d9b2156a11c1eb1eeadb894f81accf0f75bf92166ce1fec0c8eacdf2a657fb5d64dc8a20422fd649a99d81a7fc933c632376ac73dbec48b73a3a8a53c56c2c6
|
@@ -90,10 +90,12 @@ module CanvasSync::Concerns
|
|
90
90
|
private
|
91
91
|
|
92
92
|
def api_sync_race_create!(inst, save: true)
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
transaction(requires_new: true) do
|
94
|
+
inst = find_or_initialize_by(canvas_id: inst) unless inst.is_a?(self)
|
95
|
+
yield inst
|
96
|
+
inst.save! if save && inst.changed?
|
97
|
+
inst
|
98
|
+
end
|
97
99
|
rescue ActiveRecord::RecordNotUnique
|
98
100
|
inst = find_by(canvas_id: inst.canvas_id)
|
99
101
|
yield inst
|
@@ -45,7 +45,7 @@ module CanvasSync
|
|
45
45
|
redis_attr :created_at
|
46
46
|
redis_attr :callback_queue, read_only: false
|
47
47
|
redis_attr :callback_params, :json
|
48
|
-
redis_attr :allow_context_changes
|
48
|
+
redis_attr :allow_context_changes, :bool
|
49
49
|
|
50
50
|
def context
|
51
51
|
return @context if defined?(@context)
|
@@ -20,7 +20,7 @@ module CanvasSync
|
|
20
20
|
Batch.redis do |r|
|
21
21
|
r.multi do |r|
|
22
22
|
r.hset("MNGBID-#{man_batch_id}", "root_bid", root_batch.bid)
|
23
|
-
r.hset("MNGBID-#{man_batch_id}", "ordered", ordered)
|
23
|
+
r.hset("MNGBID-#{man_batch_id}", "ordered", ordered ? 1 : 0)
|
24
24
|
r.hset("MNGBID-#{man_batch_id}", "concurrency", concurrency)
|
25
25
|
r.expire("MNGBID-#{man_batch_id}", Batch::BID_EXPIRE_TTL)
|
26
26
|
|
@@ -93,6 +93,8 @@ module CanvasSync
|
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
96
|
+
ordered = CanvasSync::MiscHelper.to_boolean(ordered)
|
97
|
+
|
96
98
|
next_job_json = Batch.redis do |r|
|
97
99
|
if ordered
|
98
100
|
r.lpop("MNGBID-#{man_batch_id}-jobs")
|
@@ -41,13 +41,13 @@ module CanvasSync
|
|
41
41
|
if @initialized || @existing
|
42
42
|
redis do |r|
|
43
43
|
r.multi do |r|
|
44
|
-
r.hset(redis_key, attribute, value)
|
44
|
+
r.hset(redis_key, attribute, value.to_s)
|
45
45
|
r.expire(redis_key, Batch::BID_EXPIRE_TTL)
|
46
46
|
end
|
47
47
|
end
|
48
48
|
else
|
49
49
|
@pending_attrs ||= {}
|
50
|
-
@pending_attrs[attribute] = value
|
50
|
+
@pending_attrs[attribute] = value.to_s
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
data/lib/canvas_sync/version.rb
CHANGED
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.18.
|
4
|
+
version: 0.18.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Instructure CustomDev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -390,7 +390,7 @@ dependencies:
|
|
390
390
|
version: '0'
|
391
391
|
description:
|
392
392
|
email:
|
393
|
-
-
|
393
|
+
- pseng@instructure.com
|
394
394
|
executables: []
|
395
395
|
extensions: []
|
396
396
|
extra_rdoc_files: []
|