def _start_replication(self, resume_stream=False): start_replication( self.mysql_settings, binlog_pos_memory=(self.binlog_pos_storage_filename, 0.5), blocking=False, resume_stream=resume_stream, )
def main(): mysqlbinlog2blinker.start_replication( { 'host': 'localhost', 'user': '******', 'port': 3306, }, )
def start_publishing(): from mysqlbinlog2gpubsub import config from mysqlbinlog2gpubsub import publishers publishers.init_publishers() mysqlbinlog2blinker.start_replication( mysql_settings=config.mysql_settings, binlog_pos_memory=config.binlog_position_memory, only_schemas=config.only_schemas, only_tables=config.only_tables, )
def listening(): """ Listening mysql binlog publish to pubsub :return: """ mysqlbinlog2blinker.start_replication( { "host": "localhost", "port": 3306, "user": "******", "passwd": "slave_password", }, only_schemas=["devfest2016"], only_tables=["comment"])