游戏日报触发脚本

This commit is contained in:
pengtao 2019-10-28 14:36:09 +08:00
parent ab099049e5
commit 00eeaf6960

View File

@ -209,11 +209,15 @@ class Report:
new = args['tga'].get_data(new_sql)[0][0] or 0
share = args['tga'].get_data(share_sql)[0][0] or 0
timeonlie = round(int(args['tga'].get_data(timeonlie_sql)[0][0] or 0) / activa, 2)
ad_101 = args['tga'].get_data(ad_101_sql)[0][0] or 0
ad_1 = args['tga'].get_data(ad_1_sql)[0][0] or 0
ad_201 = args['tga'].get_data(ad_201_sql)[0][0] or 0
jumpout = args['tga'].get_data(jumpout_sql)[0][0] or 0
jump_per = round((100 * jumpout) / activa, 2)
if args['gameid'] in self.not_minigames:
ad_101 = args['tga'].get_data(ad_101_sql)[0][0] or 0
ad_1 = args['tga'].get_data(ad_1_sql)[0][0] or 0
ad_201 = args['tga'].get_data(ad_201_sql)[0][0] or 0
else:
ad_101 = ad_1 = ad_201 = 0
return [activa, new, share, timeonlie, ad_1, ad_101, ad_201, jump_per]
except Exception:
log.error(f"get data from tga failed ,{args['gameid']}", exc_info=True)