src/dirbs/listgen/generator.py
def _create_intermediate_old_tables(self):
        """Creates tables containing the old version of the lists that we are comparing against."""
        with self._conn as conn, futures.ThreadPoolExecutor(max_workers=self._nworkers) as executor:
            # Create tables and commit transaction
            with conn:
                self._run_intermediate_table_job(conn, self._create_intermediate_old_tables_structure)

            futures_to_cb = {}
            self._queue_intermediate_table_job(executor,
                                               futures_to_cb,
                                               self._populate_old_blacklist,
                                               'old blacklist')
            for op in self._operators:
                self._queue_intermediate_table_job(executor,
                                                   futures_to_cb,
                                                   partial(self._populate_old_notifications_list, op.id),
                                                   'old notifications for {0}'.format(op.id))
                self._queue_intermediate_table_job(executor,
                                                   futures_to_cb,
                                                   partial(self._populate_old_exceptions_list, op.id),
                                                   'old exceptions for {0}'.format(op.id))

            self._wait_for_futures(futures_to_cb)

            # ANALYZE parent tables, which analyzes children as well
            with conn.cursor() as cursor:
                self._analyze_helper(cursor, self._exceptions_lists_old_tblname)
                self._analyze_helper(cursor, self._notifications_lists_old_tblname)
Creates tables containing the old version of the lists that we are comparing against.
Creates tables containing the old version of the lists that we are comparing against.
Creates tables containing the old version of the lists that we are comparing against .
def _create_intermediate_old_tables(self):
        with self._conn as conn, futures.ThreadPoolExecutor(max_workers=self._nworkers) as executor:
            with conn:
                self._run_intermediate_table_job(conn, self._create_intermediate_old_tables_structure)
            futures_to_cb = {}
            self._queue_intermediate_table_job(executor,
                                               futures_to_cb,
                                               self._populate_old_blacklist,
                                               'old blacklist')
            for op in self._operators:
                self._queue_intermediate_table_job(executor,
                                                   futures_to_cb,
                                                   partial(self._populate_old_notifications_list, op.id),
                                                   'old notifications for {0}'.format(op.id))
                self._queue_intermediate_table_job(executor,
                                                   futures_to_cb,
                                                   partial(self._populate_old_exceptions_list, op.id),
                                                   'old exceptions for {0}'.format(op.id))
            self._wait_for_futures(futures_to_cb)
            with conn.cursor() as cursor:
                self._analyze_helper(cursor, self._exceptions_lists_old_tblname)
                self._analyze_helper(cursor, self._notifications_lists_old_tblname)
def _create_intermediate_old_tables ( self ) : with self . _conn as conn , futures . ThreadPoolExecutor ( max_workers = self . _nworkers ) as executor : with conn : self . _run_intermediate_table_job ( conn , self . _create_intermediate_old_tables_structure ) futures_to_cb = { } self . _queue_intermediate_table_job ( executor , futures_to_cb , self . _populate_old_blacklist , 'old blacklist' ) for op in self . _operators : self . _queue_intermediate_table_job ( executor , futures_to_cb , partial ( self . _populate_old_notifications_list , op . id ) , 'old notifications for {0}' . format ( op . id ) ) self . _queue_intermediate_table_job ( executor , futures_to_cb , partial ( self . _populate_old_exceptions_list , op . id ) , 'old exceptions for {0}' . format ( op . id ) ) self . _wait_for_futures ( futures_to_cb ) with conn . cursor ( ) as cursor : self . _analyze_helper ( cursor , self . _exceptions_lists_old_tblname ) self . _analyze_helper ( cursor , self . _notifications_lists_old_tblname )
Creates tables containing the old version of the lists that we are comparing against.
Creates tables containing the old version of the lists that we are comparing against .
"""Creates tables containing the old version of the lists that we are comparing against.""" # Create tables and commit transaction # ANALYZE parent tables, which analyzes children as well
self