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 CHANGED
@@ -1,2 +1,2 @@
1
- �o�%���ۈ�[�z�FBoU���A�@��AAtȓVH��ɱ']QV�۞G���g&�&�&n\��*ɸ��n_���ת��Q/�͉m)�<כo��?$�`Gyi�^1���G"@b��Z],z��e�J?�.���H�n�������
2
- *m��@O 'ܯ+��d��Z2T^��@<ɳ���o^n�Pع}Z�L��{����:��§�� _z��2��dNK8�߬2��:��-��G�\J�3�xA3���ή#
1
+ ������kM���rj��q?0Ii�� �����ϙ��a��-�xc�{���u�.�s��&
2
+ M�0y��W���ƆU{���O���@ۏ��r�/ax%
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### Version 0.4.5
2
+ * Add #start! to tracker
3
+
1
4
  ### Version 0.4.4
2
5
  * Relax version constraint for librato-metrics
3
6
 
@@ -19,10 +19,9 @@ module Librato
19
19
  config.register_listener(collector)
20
20
  end
21
21
 
22
- # start worker thread, one per process.
23
- # if this process has been forked from an one with an active
24
- # worker thread we don't need to worry about cleanup, the worker
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(:timer => config.event_mode)
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
@@ -1,5 +1,5 @@
1
1
  module Librato
2
2
  class Rack
3
- VERSION = "0.4.4"
3
+ VERSION = "0.4.5"
4
4
  end
5
5
  end
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
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: 2013-11-05 00:00:00.000000000 Z
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: 616270970503516173
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: 616270970503516173
143
+ hash: 3341764962779611788
144
144
  requirements: []
145
145
  rubyforge_project:
146
146
  rubygems_version: 1.8.23
metadata.gz.sig CHANGED
Binary file