mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
Fix graphite stats sending
This commit is contained in:
parent
dc789a7ac9
commit
ca717e33d7
1 changed files with 5 additions and 7 deletions
|
|
@ -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():
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue