添加daily report生成

This commit is contained in:
pengtao 2019-10-22 14:37:48 +08:00
parent 4eee7cba58
commit cf29f3bf71

View File

@ -248,13 +248,16 @@ class Report:
and "jump_appid"='{jump_appid}'
and "jump_result"=1 """
data = self.tga.get_data(jump_sql)
if data:
try:
jump_num, jump_pre = self.tga.get_data(jump_sql)[0]
jump_num, jump_pre = data[0]
return (jump_appid, FROMAPPID_CN.get(jump_appid, None), jump_num, jump_pre)
except Exception:
log.error(f"get data from output by {self.gameid} {jump_appid} failed", exc_info=True)
return None
else:
return None
def run(self):
data = dict()
@ -267,14 +270,14 @@ class Report:
data['output'] = []
fromappids = FROMAPPID_CN.keys()
for fromappid in fromappids:
pdb.set_trace()
data['input'].append(self.get_input_fromappid(fromappid))
data['output'].append(self.get_output_fromappid(fromappid))
print(data)
def main():
channelid = 6001
gameids = (1004, 2001)