fix stop-never option

This commit is contained in:
dfcao 2018-10-12 14:35:58 +08:00
parent 42c6f5353b
commit 5a8e65c432
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ UPDATE `test`.`test3` SET `addtime`='2016-12-10 13:03:22', `data`='中文', `id`
**解析模式**
--stop-never 持续解析binlog。可选。默认False同步至执行命令时最新的binlog位置。
--stop-never 持续解析binlog。可选。默认False同步至执行命令时最新的binlog位置。
-K, --no-primary-key 对INSERT语句去除主键。可选。默认False

View File

@ -64,7 +64,7 @@ class Binlog2sql(object):
def process_binlog(self):
stream = BinLogStreamReader(connection_settings=self.conn_setting, server_id=self.server_id,
log_file=self.start_file, log_pos=self.start_pos, only_schemas=self.only_schemas,
only_tables=self.only_tables, resume_stream=True)
only_tables=self.only_tables, resume_stream=True, blocking=True)
flag_last_event = False
e_start_pos, last_pos = stream.log_pos, stream.log_pos