culturecode_stagehand 0.12.6 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stagehand/schema.rb +1 -0
- data/lib/stagehand/staging/commit_entry.rb +1 -1
- data/lib/stagehand/staging/synchronizer.rb +7 -9
- data/lib/stagehand/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ef4f7ed707fdd603dee78f606e921ad59fbdf1ae
|
|
4
|
+
data.tar.gz: bb179ffa8b7e83eebc77f8588b3391b7da3f9de9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 34f3b335af3dd3012fd2e5d4d25c4e92a2c050de854a2dbd2f8ef120280912816f622baed085e1d20f97ea9aea68c08f59700169f1fc9b6b404dc4ec3b5889e5
|
|
7
|
+
data.tar.gz: 2ef4879e631f9fc512eab292206ada48631707c3bec2a374611ca0c50927dfbe444fcdce42b578e6ccbc70e8fed429ca0bbeeee3fda72b7d1ce69ed83bebfd8b
|
data/lib/stagehand/schema.rb
CHANGED
|
@@ -29,7 +29,7 @@ module Stagehand
|
|
|
29
29
|
ON active_starts.session = #{table_name}.session AND active_starts.start_id <= #{table_name}.id")
|
|
30
30
|
.where("active_starts.start_id IS NULL") }
|
|
31
31
|
scope :with_uncontained_keys, lambda {
|
|
32
|
-
joins("LEFT OUTER JOIN (#{ unscoped.contained.select('record_id, table_name').to_sql}) AS contained
|
|
32
|
+
joins("LEFT OUTER JOIN (#{ unscoped.contained.select('record_id, table_name').distinct.to_sql}) AS contained
|
|
33
33
|
ON contained.record_id = #{table_name}.record_id AND contained.table_name = #{table_name}.table_name")
|
|
34
34
|
.where("contained.record_id IS NULL")
|
|
35
35
|
}
|
|
@@ -83,15 +83,13 @@ module Stagehand
|
|
|
83
83
|
# Lazily iterate through millions of commit entries
|
|
84
84
|
# Returns commit entries in ID descending order
|
|
85
85
|
def iterate_autosyncable_entries(&block)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
with_confirmed_autosyncability(entry, &block)
|
|
94
|
-
end
|
|
86
|
+
max = CommitEntry.maximum(:id)
|
|
87
|
+
min = CommitEntry.minimum(:id)
|
|
88
|
+
|
|
89
|
+
max.step(min, -BATCH_SIZE).each do |current|
|
|
90
|
+
range = [current - BATCH_SIZE, min].max..current
|
|
91
|
+
autosyncable_entries(:id => range).uniq(&:id).each do |entry|
|
|
92
|
+
with_confirmed_autosyncability(entry, &block)
|
|
95
93
|
end
|
|
96
94
|
end
|
|
97
95
|
end
|
data/lib/stagehand/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: culturecode_stagehand
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.12.
|
|
4
|
+
version: 0.12.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nicholas Jakobsen
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2017-01
|
|
12
|
+
date: 2017-02-01 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|