jc_show 日志拆分脚本

This commit is contained in:
pengtao 2019-09-20 16:36:37 +08:00
parent be04445150
commit 4c3d8f5b8d

View File

@ -60,6 +60,7 @@ class JcShowInit:
tga_data['date'] = self.time tga_data['date'] = self.time
tga_data['channelid'] = self.channelid tga_data['channelid'] = self.channelid
tga_data['location'] = data['location'] tga_data['location'] = data['location']
tga_data['show_time'] = data['show_time']
self.tga.put_event_data(tga_data, f'rep_{self.event_type}') self.tga.put_event_data(tga_data, f'rep_{self.event_type}')
except Exception: except Exception:
log.error(f"write 2 tga failed!,context={data}", exc_info=True) log.error(f"write 2 tga failed!,context={data}", exc_info=True)
@ -73,7 +74,7 @@ class JcShowInit:
temp = {} temp = {}
temp['account_id'] = account temp['account_id'] = account
temp['location'] = data_dict['pos'] temp['location'] = data_dict['pos']
temp['ad_show'] = show_time temp['show_time'] = show_time
print(f"{temp}") print(f"{temp}")
if data_dict['ad_channel']: if data_dict['ad_channel']:
for ad_channel in data_dict['ad_channel']: for ad_channel in data_dict['ad_channel']:
@ -91,7 +92,7 @@ class JcShowInit:
temp = {} temp = {}
temp['account_id'] = account temp['account_id'] = account
temp['location'] = data_dict['pos'] temp['location'] = data_dict['pos']
temp['ad_show'] = show_time temp['show_time'] = show_time
if data_dict['ad_channel']: if data_dict['ad_channel']:
for ad_channel in data_dict['ad_channel']: for ad_channel in data_dict['ad_channel']:
temp['ad_channel'] = ad_channel temp['ad_channel'] = ad_channel