(self, curs)
Load table state from database.

        Todo: if all tables are OK, there is no need
        to load state on every batch.
Load table state from database.
Load table state from database .
def load_table_state(self, curs):
        """Load table state from database.

        Todo: if all tables are OK, there is no need
        to load state on every batch.
        """

        q = "select * from londiste.get_table_list(%s)"
        curs.execute(q, [self.set_name])

        new_list = []
        new_map = {}
        for row in curs.fetchall():
            if not row['local']:
                continue
            t = self.get_table_by_name(row['table_name'])
            if not t:
                t = TableState(row['table_name'], self.log)
            t.loaded_state(row)
            new_list.append(t)
            new_map[t.name] = t

        self.table_list = new_list
        self.table_map = new_map
def load_table_state ( self , curs ) : q = "select * from londiste.get_table_list(%s)" curs . execute ( q , [ self . set_name ] ) new_list = [ ] new_map = { } for row in curs . fetchall ( ) : if not row [ 'local' ] : continue t = self . get_table_by_name ( row [ 'table_name' ] ) if not t : t = TableState ( row [ 'table_name' ] , self . log ) t . loaded_state ( row ) new_list . append ( t ) new_map [ t . name ] = t self . table_list = new_list self . table_map = new_map