mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Send graphite data from within a thread
...so that if it fails, it doesn't kill our whole processing thread
This commit is contained in:
parent
c80cac8def
commit
3239ea29bd
1 changed files with 5 additions and 3 deletions
|
|
@ -8,9 +8,11 @@ class Graphite
|
|||
end
|
||||
|
||||
def log path, value
|
||||
Thread.new {
|
||||
socket = TCPSocket.new(@server, 2003)
|
||||
socket.puts "#{path} #{value} #{Time.now.to_i}"
|
||||
socket.close
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue