diff --git a/app.py b/app.py index 93b0578..d04d3cf 100644 --- a/app.py +++ b/app.py @@ -51,6 +51,8 @@ class XProcess(Process): elif 'track' in type_: # continue + if data['#event_name'] == 'pay': + self.log.info(data) obj = getattr(handler_event, type_) obj(data) elif type_ == settings.STOP_SIGNAL: diff --git a/v2/transmitter.py b/v2/transmitter.py index e2bf54d..b739e27 100644 --- a/v2/transmitter.py +++ b/v2/transmitter.py @@ -80,9 +80,11 @@ class Transmitter: self.db_client.execute(sql) self.log.info(f'进程{self.p} 写入耗时 {int(time.time() * 1000) - ts}') except Exception as e: + self.log.error(traceback.format_exc()) # 丢弃错误行 再次发送 if hasattr(e, 'code') and e.code == 26: m = re.match('(.*)?Stack trace', e.message) + self.log.error(data) if m: error_msg = m.group(1) error_row = re.match('.*?errors out of (\d+) rows', error_msg)