culturecode_stagehand 0.13.0 → 0.13.1
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/staging/synchronizer.rb +4 -6
- data/lib/stagehand/version.rb +1 -1
- data/lib/tasks/stagehand_tasks.rake +2 -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: eb2b08c122596046788d7fa78b94a8087a5fbe53
|
|
4
|
+
data.tar.gz: 6e7caaffa2016dbf8b3ccf51219db0ee88be3639
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8bd0c3bc83ba04214a318814d7ab4a74d2c2bcf939c7234fc154e049617402a6c732479a09e374fadc7f153d8388ad5acc1bb8ae983b3032a9f4c0f6cfb2c11e
|
|
7
|
+
data.tar.gz: 6b9b05ce1222fc70191a38a7ebb4c27b151d0f8f999485045d85d15c3975e96ba55a958e1930cc65c910ed11e615818b77ff6b03d1e44fbe4e8560773e407cf1
|
|
@@ -83,12 +83,10 @@ 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
|
-
range = [current - BATCH_SIZE, min].max..current
|
|
91
|
-
with_confirmed_autosyncability(autosyncable_entries(:id => range).order(:id => :desc), &block)
|
|
86
|
+
current = CommitEntry.maximum(:id).to_i
|
|
87
|
+
while entries = autosyncable_entries("id <= #{current}").limit(BATCH_SIZE).order(:id => :desc).to_a.presence do
|
|
88
|
+
with_confirmed_autosyncability(entries.uniq(&:key), &block)
|
|
89
|
+
current = entries.last.try(:id).to_i - 1
|
|
92
90
|
end
|
|
93
91
|
end
|
|
94
92
|
|
data/lib/stagehand/version.rb
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
namespace :stagehand do
|
|
2
2
|
desc "Polls the commit entries table for changes to sync to production"
|
|
3
3
|
task :auto_sync, [:delay] => :environment do |t, args|
|
|
4
|
-
|
|
4
|
+
delay = args[:delay].present? ? args[:delay].to_i : 5.seconds
|
|
5
|
+
Stagehand::Staging::Synchronizer.auto_sync(delay)
|
|
5
6
|
end
|
|
6
7
|
|
|
7
8
|
desc "Syncs records that don't need confirmation to production"
|
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.13.
|
|
4
|
+
version: 0.13.1
|
|
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-02-
|
|
12
|
+
date: 2017-02-04 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|