From 820d100ae03a6de2bba5faba5693633b5847e749 Mon Sep 17 00:00:00 2001 From: pengtao Date: Wed, 27 Nov 2019 16:04:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0tap=202=20influxdb=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- taptap/tap2influxdb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/taptap/tap2influxdb.py b/taptap/tap2influxdb.py index d648add..812b5fc 100644 --- a/taptap/tap2influxdb.py +++ b/taptap/tap2influxdb.py @@ -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_new" + self.measurement = "tapdata" def get_tga_data(self): sql = f"""SELECT @@ -46,11 +46,11 @@ class TAP2Influx: if data: try: for line in data: - gameid, catename, cate, title, score, tag, reserve, watch, download, sell, review, topic, createdat = line + gameid, catename, cate, title, score, order, tag, reserve, watch, download, sell, review, topic, createdat = line 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, "cate": cate, - "catedat": createdat} + "catedat": createdat, "order": order} temp = {"measurement": self.measurement, "tags": tags, "fields": fields} body.append(temp) except Exception: