add tags field

This commit is contained in:
pengtao 2019-11-04 11:17:42 +08:00
parent 44c6ef76c7
commit 87a2cb092f

View File

@ -3,7 +3,7 @@ from ops.mmysql import MysqlBase
from ops.plog import define_logger
import logging
import datetime
from collections import defaultdict
import pdb
define_logger("/data/logs/ops/split_tags.log")
log = logging.getLogger(__name__)
@ -21,6 +21,7 @@ class SplitTapTags:
def run(self):
all = dict()
for types in self.type:
all[types] = defaultdict[dict]
sql = f"""select
tags
from
@ -30,7 +31,6 @@ class SplitTapTags:
and date='{self.day}' """
tags = self.db_conn.query(sql)
if tags:
pdb.set_trace()
for line in tags:
if line:
try: