Skip to content
Snippets Groups Projects
Commit 47e021d0 authored by Andrea Michelotti's avatar Andrea Michelotti
Browse files

update multi key

parent fc4aa097
No related branches found
No related tags found
No related merge requests found
Pipeline #105888 failed
{
"dataset":[
{
"name":"flame_state",
"type":"json",
"description":"Flame state",
"offset":0,
"len":512,
"keybind":"FLAME_STATE"
},{
"name":"flame_state",
"type":"json",
"description":"Flame state STR",
"offset":0,
"len":512,
"keybind":"FLAME_STATE_STR"
}]
}
......@@ -125,6 +125,7 @@ except:
if args.key:
vector_key=split_list = args.key.split(",") # Splitting at comma delimiter
try:
args.keyRate = int(args.keyRate)
except ValueError as e :
......@@ -135,12 +136,14 @@ if args.key:
name = args.keyName
else:
name = args.key
while True:
payload = []
payload = jsonKey2Influx(args.key, clientMemcached, name)
print('Publishing data')
print(payload)
clientInflux.write_points(payload)
for s in vector_key:
payload = jsonKey2Influx(s, clientMemcached, s)
print('Publishing data')
print(payload)
clientInflux.write_points(payload)
time.sleep(args.keyRate)
elif args.file:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment