red_cross 0.2.15 → 0.2.16
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d3739465db5df8f0672b609ca203612980a249c
|
4
|
+
data.tar.gz: 97e5ac7a9cd22329e8627c67e16149a29e5f7bdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88d654acd3f0bdffa11c7ff19ff2a6aa183c524cd37e0f2859acd68b69c8823f86d510c00d050d54b3baae5ea8b687738828c32f92e15361f5018d1ac05b93b5
|
7
|
+
data.tar.gz: b51a4f5da708caac7bd466ce9ce6ec4d0d215f4f9baaa81aabae21780601c70df3f87eb2166f8af55eb996a88e5f093730b5f977fc7347b0c3cd53224de439f4
|
@@ -60,7 +60,7 @@ module Resque
|
|
60
60
|
|
61
61
|
def send_metrics(job_status, *args)
|
62
62
|
event_properties = default_event_properties(*args)
|
63
|
-
event_properties[:fields][:run_time] = ((@red_cross_job_end_time - @red_cross_job_start_time)*1000).to_i if %w(performed failed).include? job_status
|
63
|
+
event_properties[:fields][:run_time] = ((@red_cross_job_end_time.to_f - @red_cross_job_start_time.to_f)*1000).to_i if %w(performed failed).include? job_status
|
64
64
|
::RedCross.monitor_track(event: 'resque', properties: event_properties.merge({ job_status: job_status }))
|
65
65
|
end
|
66
66
|
end
|
@@ -3,12 +3,20 @@ module RedCross
|
|
3
3
|
class MonitorTracker < RedCross::Trackers::Base
|
4
4
|
attr_accessor :client
|
5
5
|
|
6
|
-
def initialize(database = 'test', host = 'localhost', port = 8086, write_timeout = 0.05, read_timeout = 0.05,
|
6
|
+
def initialize(database = 'test', host = 'localhost', port = 8086, write_timeout = 0.05, read_timeout = 0.05,
|
7
|
+
logger = false, async = true)
|
7
8
|
InfluxDB::Logging.logger = logger
|
9
|
+
async_options = async
|
10
|
+
if async_options == true
|
11
|
+
async_options = {
|
12
|
+
num_worker_threads: 1
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
8
16
|
@client = InfluxDB::Client.new database,
|
9
17
|
host: host,
|
10
18
|
port: port,
|
11
|
-
async:
|
19
|
+
async: async_options,
|
12
20
|
retry: false,
|
13
21
|
write_timeout: write_timeout.to_f,
|
14
22
|
read_timeout: read_timeout.to_f
|
data/lib/red_cross/version.rb
CHANGED
data/red_cross.gemspec
CHANGED
@@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
|
-
spec.add_dependency 'analytics-ruby', '~> 2.
|
22
|
+
spec.add_dependency 'analytics-ruby', '~> 2.2.2'
|
23
23
|
spec.add_dependency 'typhoeus', '~> 0.6.5'
|
24
24
|
spec.add_dependency 'resque', '~> 1.25'
|
25
|
-
spec.add_dependency 'influxdb', '~> 0.
|
25
|
+
spec.add_dependency 'influxdb', '~> 0.5.0'
|
26
26
|
|
27
27
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
28
28
|
spec.add_development_dependency 'rake', '~> 10.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: red_cross
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ronbarab
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: analytics-ruby
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.2.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.2.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: typhoeus
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.5.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.5.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
145
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.
|
146
|
+
rubygems_version: 2.6.14
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: Redcross gem transport events to an event collector
|