telemetry 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/bin/telemetryd +5 -4
- data/lib/telemetry/daemon_config_parser.rb +11 -1
- data/lib/telemetry/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OWU5MzRkM2NjNjIzYjhiMDExNjc3MjRkMjc5NjE5ZmMxOGM4MjNlMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzYwNTczYTQ4YjU5YWM3OThkMjdmMzc3NjJhNjhlYzNiN2NjM2M2Yg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDkzZjZlYWFhNzhjNzBhOWQ3YTE3MzE3NmI1NmM3N2YyNDI0M2NhY2YzMzFj
|
10
|
+
MTViZDBmYWVhM2IxYTI0NzQzMTk3N2JiYTExYmVjZDI5Y2UwN2IwMjY4YmVh
|
11
|
+
MmE3ZDE2ZjQyMjA4ZmI4Yjc3NzEwOGQ2N2U5MDY2ZDAxNGUxYTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDMwMDYxOTlhMTI4NTExMjcxNDNkYTY0NWViYThhM2Q2ZTIzMTQyY2YzZTQx
|
14
|
+
ZmRlMzA0NzMzOGQxOWVhZDBiN2ZmM2JhOWNkMWQwYzJiYjJhMWI0OTFmNmMz
|
15
|
+
OTg2NWU4ZDgwMDNjMTYyMWY1ZmIyMTkyNDBiOGEwNDRmNzIwMGE=
|
data/bin/telemetryd
CHANGED
@@ -39,10 +39,11 @@ runner.execute do |opts|
|
|
39
39
|
TelemetryDaemon.run_begin_interval
|
40
40
|
output = TelemetryDaemon.run_scheduled_flow_updates
|
41
41
|
|
42
|
-
Telemetry::logger.debug "Beginning run"
|
43
|
-
|
44
42
|
begin
|
45
|
-
|
43
|
+
unless output == {}
|
44
|
+
Telemetry::logger.debug "Beginning run"
|
45
|
+
Telemetry::Api.send(:post, "/flows", {:data => output})
|
46
|
+
end
|
46
47
|
|
47
48
|
rescue Telemetry::RateLimited
|
48
49
|
Telemetry::logger.error "Rate limited: sleeping for 3600s"
|
@@ -64,7 +65,7 @@ runner.execute do |opts|
|
|
64
65
|
|
65
66
|
exit if opts[:once]
|
66
67
|
|
67
|
-
Telemetry::logger.debug "
|
68
|
+
Telemetry::logger.debug "Waiting...\n"
|
68
69
|
|
69
70
|
TelemetryDaemon.run_end_interval
|
70
71
|
TelemetryDaemon.wait_for_interval_from(start_timestamp)
|
@@ -171,12 +171,19 @@ module TelemetryDaemon
|
|
171
171
|
variant, tag, frequency, offset, block = task
|
172
172
|
now = Time.now
|
173
173
|
|
174
|
+
|
174
175
|
# Check whether we should wait an interval before running
|
175
176
|
if frequency > 0
|
177
|
+
Telemetry::logger.debug "Task #{task[0]} #{task[1]} (every #{task[2]}s)"
|
176
178
|
#Telemetry::logger.debug "Update frequency is #{frequency} now #{Time.now.to_i} next #{@@next_run_at[tag]}"
|
177
|
-
|
179
|
+
if @@next_run_at[tag] && @@next_run_at[tag] > now.to_i
|
180
|
+
puts " - Not scheduled yet (waiting #{-(now.to_i - @@next_run_at[tag])}s)"
|
181
|
+
next
|
182
|
+
end
|
178
183
|
@@next_run_at[tag] = now.to_i + frequency
|
179
184
|
|
185
|
+
Telemetry::logger.debug " - Running intermittant task at #{now}"
|
186
|
+
|
180
187
|
# If an offset is defined then align runtimes to the offset
|
181
188
|
# How close you can get to the desired offset depends on the global interval. So set it relatively small
|
182
189
|
# when using this feature
|
@@ -188,9 +195,12 @@ module TelemetryDaemon
|
|
188
195
|
@@next_run_at[tag] -= time_since_offset % frequency
|
189
196
|
#Telemetry::logger.debug "#{now.to_i} #{@@next_run_at[tag]}"
|
190
197
|
end
|
198
|
+
else
|
199
|
+
Telemetry::logger.debug " - Task #{task[0]} #{task[1]}"
|
191
200
|
end
|
192
201
|
|
193
202
|
# Execute the flow
|
203
|
+
Telemetry.logger.debug " + Executing task #{task[0]} #{task[1]}"
|
194
204
|
block.yield
|
195
205
|
|
196
206
|
next if @hh == {}
|
data/lib/telemetry/version.rb
CHANGED