1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-11 15:13:27 +02:00

Fix graphite stats sending

This commit is contained in:
Ciaran Gultnieks 2013-05-25 13:51:52 +01:00
parent dc789a7ac9
commit ca717e33d7

View File

@ -32,14 +32,12 @@ import common
import socket
carbon_socket = None
def carbon_send(key, value):
global carbon_socket
if not carbon_socket:
carbon_socket = socket.socket()
carbon_socket = carbon_socket.connect((carbon_host, carbon_port))
msg = '%s %d 42 %d\n' % (key, value, int(time.time()))
carbon_socket.sendall(msg)
s = socket.socket()
s.connect((carbon_host, carbon_port))
msg = '%s %d %d\n' % (key, value, int(time.time()))
s.sendall(msg)
s.close()
def main():