src/dirbs/listgen/generator.py
def _create_intermediate_new_tables(self):
        """Create temp tables for blacklisted IMEIs, IMEIs to notify, etc."""
        with futures.ThreadPoolExecutor(max_workers=self._nworkers) as executor:
            # Create all the tables and populate initial tables. Need to commit so that threadpool jobs can
            # see the results
            with self._conn:
                self._run_intermediate_table_job(self._conn, self._create_intermediate_new_tables_structure)
                # Create utility tables
                self._run_intermediate_table_job(self._conn, self._populate_blocking_conditions_table,
                                                 description='blocking conditions')
                self._run_intermediate_table_job(self._conn, self._populate_mcc_mnc_table,
                                                 description='MCC-MNC operator mappings')
                # Create new blacklist table
                self._run_intermediate_table_job(self._conn, self._populate_new_blacklist,
                                                 description='IMEIs to blacklist')

            # Create required notifications and pairings tables in parallel before we can kick off the per-MNO
            # pairing and and notifications. These jobs have the responsibilities of kicking off those per-MNO jobs
            futures_to_cb = {}
            self._queue_intermediate_table_job(executor,
                                               futures_to_cb,
                                               self._populate_new_notifications_lists,
                                               'per-MNO notifications for all operators')
            self._queue_intermediate_table_job(executor,
                                               futures_to_cb,
                                               self._populate_new_exceptions_lists,
                                               'per-MNO exceptions for all operators')
            self._wait_for_futures(futures_to_cb)
Create temp tables for blacklisted IMEIs, IMEIs to notify, etc.
Create temp tables for blacklisted IMEIs, IMEIs to notify, etc.
Create temp tables for blacklisted IMEIs IMEIs to notify etc .
def _create_intermediate_new_tables(self):
        with futures.ThreadPoolExecutor(max_workers=self._nworkers) as executor:
            with self._conn:
                self._run_intermediate_table_job(self._conn, self._create_intermediate_new_tables_structure)
                self._run_intermediate_table_job(self._conn, self._populate_blocking_conditions_table,
                                                 description='blocking conditions')
                self._run_intermediate_table_job(self._conn, self._populate_mcc_mnc_table,
                                                 description='MCC-MNC operator mappings')
                self._run_intermediate_table_job(self._conn, self._populate_new_blacklist,
                                                 description='IMEIs to blacklist')
            futures_to_cb = {}
            self._queue_intermediate_table_job(executor,
                                               futures_to_cb,
                                               self._populate_new_notifications_lists,
                                               'per-MNO notifications for all operators')
            self._queue_intermediate_table_job(executor,
                                               futures_to_cb,
                                               self._populate_new_exceptions_lists,
                                               'per-MNO exceptions for all operators')
            self._wait_for_futures(futures_to_cb)
def _create_intermediate_new_tables ( self ) : with futures . ThreadPoolExecutor ( max_workers = self . _nworkers ) as executor : with self . _conn : self . _run_intermediate_table_job ( self . _conn , self . _create_intermediate_new_tables_structure ) self . _run_intermediate_table_job ( self . _conn , self . _populate_blocking_conditions_table , description = 'blocking conditions' ) self . _run_intermediate_table_job ( self . _conn , self . _populate_mcc_mnc_table , description = 'MCC-MNC operator mappings' ) self . _run_intermediate_table_job ( self . _conn , self . _populate_new_blacklist , description = 'IMEIs to blacklist' ) futures_to_cb = { } self . _queue_intermediate_table_job ( executor , futures_to_cb , self . _populate_new_notifications_lists , 'per-MNO notifications for all operators' ) self . _queue_intermediate_table_job ( executor , futures_to_cb , self . _populate_new_exceptions_lists , 'per-MNO exceptions for all operators' ) self . _wait_for_futures ( futures_to_cb )
Create temp tables for blacklisted IMEIs, IMEIs to notify, etc.
Create temp tables for blacklisted IMEIs IMEIs to notify etc .
"""Create temp tables for blacklisted IMEIs, IMEIs to notify, etc.""" # Create all the tables and populate initial tables. Need to commit so that threadpool jobs can # see the results # Create utility tables # Create new blacklist table # Create required notifications and pairings tables in parallel before we can kick off the per-MNO # pairing and and notifications. These jobs have the responsibilities of kicking off those per-MNO jobs
self