mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 14:30:11 +01:00
Fix graphite stats sending
This commit is contained in:
parent
dc789a7ac9
commit
ca717e33d7
@ -32,14 +32,12 @@ import common
|
|||||||
import socket
|
import socket
|
||||||
|
|
||||||
|
|
||||||
carbon_socket = None
|
|
||||||
def carbon_send(key, value):
|
def carbon_send(key, value):
|
||||||
global carbon_socket
|
s = socket.socket()
|
||||||
if not carbon_socket:
|
s.connect((carbon_host, carbon_port))
|
||||||
carbon_socket = socket.socket()
|
msg = '%s %d %d\n' % (key, value, int(time.time()))
|
||||||
carbon_socket = carbon_socket.connect((carbon_host, carbon_port))
|
s.sendall(msg)
|
||||||
msg = '%s %d 42 %d\n' % (key, value, int(time.time()))
|
s.close()
|
||||||
carbon_socket.sendall(msg)
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user