librato-rack 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +2 -2
- data/CHANGELOG.md +3 -0
- data/lib/librato/rack/tracker.rb +12 -5
- data/lib/librato/rack/version.rb +1 -1
- metadata +4 -4
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
������kM���rj��q?0Ii�������ϙ��a��-�xc�{���u�.�s��&
|
2
|
+
M�0y��W���ƆU{���O���@ۏ��r�/a�x%
|
data/CHANGELOG.md
CHANGED
data/lib/librato/rack/tracker.rb
CHANGED
@@ -19,10 +19,9 @@ module Librato
|
|
19
19
|
config.register_listener(collector)
|
20
20
|
end
|
21
21
|
|
22
|
-
# start worker
|
23
|
-
# if
|
24
|
-
#
|
25
|
-
# thread will not pass with the fork
|
22
|
+
# check to see if we should start a worker for this process.
|
23
|
+
# if you are using this externally, use #start! instead as this
|
24
|
+
# method may change
|
26
25
|
def check_worker
|
27
26
|
return if @worker # already running
|
28
27
|
return unless start_worker?
|
@@ -30,7 +29,7 @@ module Librato
|
|
30
29
|
@pid = $$
|
31
30
|
log(:debug) { ">> starting up worker for pid #{@pid}..." }
|
32
31
|
|
33
|
-
@worker = Worker.new(:
|
32
|
+
@worker = Worker.new(timer: config.event_mode)
|
34
33
|
@worker.run_periodically(config.flush_interval) do
|
35
34
|
flush
|
36
35
|
end
|
@@ -82,6 +81,14 @@ module Librato
|
|
82
81
|
false
|
83
82
|
end
|
84
83
|
|
84
|
+
# start worker thread, one per process.
|
85
|
+
# if this process has been forked from an one with an active
|
86
|
+
# worker thread we don't need to worry about cleanup, the worker
|
87
|
+
# thread will not pass with the fork
|
88
|
+
def start!
|
89
|
+
check_worker if should_start?
|
90
|
+
end
|
91
|
+
|
85
92
|
# change output stream for logging
|
86
93
|
def update_log_target(target)
|
87
94
|
logger.outlet = target
|
data/lib/librato/rack/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: librato-rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -37,7 +37,7 @@ cert_chain:
|
|
37
37
|
bktaNmhlblFBRjFDSDk2WmNxY0pIMTc5UzJ0SWlLRE04a2VlUklVT1BDM1dU
|
38
38
|
MGZhb2svMgpnQTJvemRyODUxYy9uQT09Ci0tLS0tRU5EIENFUlRJRklDQVRF
|
39
39
|
LS0tLS0K
|
40
|
-
date:
|
40
|
+
date: 2014-05-13 00:00:00.000000000 Z
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: librato-metrics
|
@@ -131,7 +131,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
131
|
version: '0'
|
132
132
|
segments:
|
133
133
|
- 0
|
134
|
-
hash:
|
134
|
+
hash: 3341764962779611788
|
135
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
136
|
none: false
|
137
137
|
requirements:
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
segments:
|
142
142
|
- 0
|
143
|
-
hash:
|
143
|
+
hash: 3341764962779611788
|
144
144
|
requirements: []
|
145
145
|
rubyforge_project:
|
146
146
|
rubygems_version: 1.8.23
|
metadata.gz.sig
CHANGED
Binary file
|