添加tap 2 influxdb脚本
This commit is contained in:
parent
9290622622
commit
5157037e3f
@ -19,7 +19,7 @@ class TAP2Influx:
|
||||
self.tga = FromTga(url=url, token=api_secret)
|
||||
self.day = day
|
||||
self.influx = InfluxDBClient('10.10.3.19', '8086', 'miles', 'aspect', 'tap_data')
|
||||
self.measurement = "tapdata"
|
||||
self.measurement = "tapdata_new"
|
||||
|
||||
def get_tga_data(self):
|
||||
sql = f"""SELECT
|
||||
@ -47,9 +47,10 @@ class TAP2Influx:
|
||||
try:
|
||||
for line in data:
|
||||
gameid, catename, cate, title, score, tag, reserve, watch, download, sell, review, topic, createdat = line
|
||||
tags = {"gameid": int(gameid), "catename": catename, "cate": cate, "catedat": createdat}
|
||||
tags = {"gameid": int(gameid), "catename": catename}
|
||||
fields = {"title": title, "score": score, "tag": tag, "reserve": reserve, "watch": watch,
|
||||
"download": download, "sell": sell, "review": review, "topic": topic}
|
||||
"download": download, "sell": sell, "review": review, "topic": topic, "cate": cate,
|
||||
"catedat": createdat}
|
||||
temp = {"measurement": self.measurement, "tags": tags, "fields": fields}
|
||||
body.append(temp)
|
||||
except Exception:
|
||||
|
Loading…
x
Reference in New Issue
Block a user