puppetdb_query 0.0.32 → 0.0.33
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/puppetdb_query/sync.rb +2 -2
- data/lib/puppetdb_query/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: 70a9767d6cb69f3d7270938bdfc71d477f02988f
|
|
4
|
+
data.tar.gz: 30dd2aec2e32755cf2a304d8547af04d72a66c56
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e9fa831eaa07e0f0a6b25a738390f8a3b4e2a5d12c9feae4b4f363437f5867ef803314b4081cd078a5cb1b0567ac53ec05d29055af455559ffa21c893c261c94
|
|
7
|
+
data.tar.gz: 2e746b17722457f60c4ed4a06418731d8c8f3405ba56ac02e21b191d54a4014fc9067e3a50e4924c057982f3274c6e6ad479fcbe31d39ceb86cef69947bf8dc3
|
data/lib/puppetdb_query/sync.rb
CHANGED
|
@@ -15,7 +15,7 @@ module PuppetDBQuery
|
|
|
15
15
|
@destination = destination
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def sync(minutes = 60, seconds = 10)
|
|
18
|
+
def sync(minutes = 60, seconds = 10, seconds_back = 4)
|
|
19
19
|
logger.info "syncing puppetdb nodes and facts started, running #{minutes} minutes"
|
|
20
20
|
Timeout.timeout(60 * minutes - seconds) do
|
|
21
21
|
@updater = PuppetDBQuery::Updater.new(source, destination)
|
|
@@ -29,7 +29,7 @@ module PuppetDBQuery
|
|
|
29
29
|
begin
|
|
30
30
|
check_minutely
|
|
31
31
|
ts = Time.now
|
|
32
|
-
updater.update3(timestamp -
|
|
32
|
+
updater.update3(timestamp - seconds_back)
|
|
33
33
|
timestamp = ts
|
|
34
34
|
rescue Timeout::Error
|
|
35
35
|
logger.info "syncing puppetdb nodes: now our time is up, we finsh"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: puppetdb_query
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.33
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Meyling
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-02-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|