astro-collectd 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :minor: 0
3
- :patch: 10
2
+ :patch: 11
4
3
  :major: 0
4
+ :minor: 0
@@ -13,7 +13,10 @@ module Collectd
13
13
  Thread.critical = true
14
14
  pkt = make_pkt
15
15
  Thread.critical = false
16
- @sock.send(pkt, 0)
16
+ begin
17
+ @sock.send(pkt, 0)
18
+ rescue SystemCallError
19
+ end
17
20
  end
18
21
  end
19
22
 
@@ -16,7 +16,11 @@ module Collectd
16
16
  @@servers = []
17
17
 
18
18
  def add_server(interval, addr='ff18::efc0:4a42', port=25826)
19
- @@servers << Server.new(interval, addr, port)
19
+ if defined?(EM) && EM.running?
20
+ @@servers << EmServer.new
21
+ else
22
+ @@servers << Server.new(interval, addr, port)
23
+ end
20
24
  end
21
25
 
22
26
  def <<(server)
@@ -17,7 +17,10 @@ module Collectd
17
17
  Thread.critical = true
18
18
  pkt = make_pkt
19
19
  Thread.critical = false
20
- @sock.send(pkt, 0)
20
+ begin
21
+ @sock.send(pkt, 0)
22
+ rescue SystemCallError
23
+ end
21
24
  end
22
25
  end.abort_on_exception = true
23
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: astro-collectd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephan Maka
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-19 00:00:00 -07:00
12
+ date: 2009-09-22 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -63,5 +63,5 @@ specification_version: 3
63
63
  summary: Send collectd statistics from Ruby
64
64
  test_files:
65
65
  - spec/interface_spec.rb
66
- - examples/em_sender.rb
67
66
  - examples/sender.rb
67
+ - examples/em_sender.rb