mirror of
https://github.com/newnius/YAO-agent.git
synced 2025-06-06 21:31:55 +00:00
update
This commit is contained in:
parent
f4925f25a5
commit
afc5b55a93
3
agent.py
3
agent.py
@ -190,6 +190,7 @@ class MyHandler(BaseHTTPRequestHandler):
|
||||
if exit_code != 0:
|
||||
msg["code"] = 1
|
||||
msg["error"] = output.decode('utf-8').rstrip('\n')
|
||||
print(msg["error"])
|
||||
except Exception as e:
|
||||
msg = {"code": 1, "error": str(e)}
|
||||
print(str(e))
|
||||
@ -363,7 +364,7 @@ def report_msg(stats):
|
||||
producer = KafkaProducer(bootstrap_servers=KafkaBrokers)
|
||||
future = producer.send('yao', value=data.encode(), partition=0)
|
||||
result = future.get(timeout=10)
|
||||
print(result)
|
||||
# print(result)
|
||||
|
||||
|
||||
def listener():
|
||||
|
Loading…
Reference in New Issue
Block a user