(self, params)
Add table.
Add table.
Add table .
def cmd_londiste_add_table(self, params):
        """Add table."""

        args = []
        for a in ('skip_truncate', 'expect_sync', 'backup', 'no_triggers', 'skip'):
            if a in params:
                args.append(a)
        for a in ('tgflags', 'ignore', 'pkey', 'when',
                  'ev_type', 'ev_data',
                  'ev_extra1', 'ev_extra2', 'ev_extra3', 'ev_extra4'):
            if a in params:
                args.append("%s=%s" % (a, params[a]))

        curs = self.db.cursor()
        q = """select * from londiste.local_add_table(%s, %s, %s)"""
        for tbl in params['tables']:
            curs.execute(q, [self.cur_queue, tbl, args])
            res = curs.fetchone()
            print res[0], res[1]
        print 'ADD_TABLE'
def cmd_londiste_add_table ( self , params ) : args = [ ] for a in ( 'skip_truncate' , 'expect_sync' , 'backup' , 'no_triggers' , 'skip' ) : if a in params : args . append ( a ) for a in ( 'tgflags' , 'ignore' , 'pkey' , 'when' , 'ev_type' , 'ev_data' , 'ev_extra1' , 'ev_extra2' , 'ev_extra3' , 'ev_extra4' ) : if a in params : args . append ( "%s=%s" % ( a , params [ a ] ) ) curs = self . db . cursor ( ) q = """select * from londiste.local_add_table(%s, %s, %s)""" for tbl in params [ 'tables' ] : curs . execute ( q , [ self . cur_queue , tbl , args ] ) res = curs . fetchone ( ) print res [ 0 ] , res [ 1 ] print 'ADD_TABLE'