telemetry 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -139,6 +139,8 @@ module Telemetry
139
139
  # Execute the flow
140
140
  block.yield
141
141
 
142
+ next if @hh == {}
143
+
142
144
  # Append the variant
143
145
  values = @@h.merge({variant: variant})
144
146
 
@@ -11,18 +11,16 @@ module Telemetry
11
11
 
12
12
  RestClient.proxy = ENV['http_proxy'] if ENV['http_proxy']
13
13
 
14
- uri = "http://#{Telemetry.token}:@data.telemetryboard.com/v1/data.json"
14
+ uri = "https://#{Telemetry.token}:@data.telemetryapp.com/v1/data.json"
15
15
  body = MultiJson.dump({:data => data})
16
16
 
17
- puts "#{Time.now} Updating Data (#{data.keys.join(", ")})"
18
-
19
17
  begin
20
18
  response = RestClient.post(uri, body, :content_type => :json, :accept => :json) do |response, request, result|
21
19
  case response.code
22
20
  when 200
23
21
  json = MultiJson.load(response)
24
22
  if json
25
- puts "#{Time.now} Update OK: Updated #{json["updated"].count} flows (#{json["updated"].join(", ")})" if json["updated"] && json["updated"].count > 0
23
+ puts "#{Time.now} Update OK: Updated #{json["updated"].count} flows" if json["updated"] && json["updated"].count > 0
26
24
  puts "#{Time.now} Update OK: Skipped #{json["skipped"].count} flows (#{json["skipped"].join(", ")})" if json["skipped"] && json["skipped"].count > 0
27
25
  puts "#{Time.now} Update OK: Errors with #{json["errors"].count} flows (#{json["errors"].join(", ")})" if json["errors"] && json["errors"].count > 0
28
26
  end
@@ -57,6 +55,10 @@ module Telemetry
57
55
  rescue Errno::ECONNREFUSED => e
58
56
  puts "#{Time.now} ERROR #{e}"
59
57
  sleep 60
58
+
59
+ rescue Exception => e
60
+ puts "#{Time.now} ERROR #{e}"
61
+ sleep 60
60
62
  end
61
63
  end
62
64
  end
@@ -1,3 +1,3 @@
1
1
  module Telemetry
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telemetry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-26 00:00:00.000000000 Z
12
+ date: 2013-02-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oj