修复空文件生成的BUG

This commit is contained in:
pengtao 2019-08-13 14:38:55 +08:00
parent bb25272338
commit b5bc024dd9

View File

@ -40,7 +40,10 @@ class GetFromTga:
tga_tap['gameid'] = self.gameid
tga_tap['channelid'] = self.channelid
tga_tap['date'] = self.date
self.tga.put_event_data(tga_tap, f'rep_{self.event_type}')
if data:
self.tga.put_event_data(tga_tap, f'rep_{self.event_type}')
else:
log.error(f"write {data} 2 tga!,event_type=f{self.event_type}", exc_info=True)
except Exception:
log.error(f"write 2 tga failed!", exc_info=True)