src/dirbs/listgen/generator.py
def _store_list_deltas(self):
        """Write the delta lists to the real tables and update the end dates of any outdated records."""
        # Create tables and commit immediately
        with self._conn as conn:
            self._run_intermediate_table_job(conn, self._create_missing_delta_storage_partitions)

        with self._conn as conn, futures.ThreadPoolExecutor(max_workers=self._nworkers) as executor:
            futures_to_cb = {}
            self._queue_delta_table_job(executor,
                                        futures_to_cb,
                                        self._store_blacklist_delta,
                                        'blacklist')
            for op in self._operators:
                self._queue_delta_table_job(executor,
                                            futures_to_cb,
                                            partial(self._store_notifications_list_delta, op.id),
                                            'notifications for {0}'.format(op.id))
                self._queue_delta_table_job(executor,
                                            futures_to_cb,
                                            partial(self._store_exceptions_list_delta, op.id),
                                            '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._notifications_lists_tblname)
                self._analyze_helper(cursor, self._exceptions_lists_tblname)
Write the delta lists to the real tables and update the end dates of any outdated records.
Write the delta lists to the real tables and update the end dates of any outdated records.
Write the delta lists to the real tables and update the end dates of any outdated records .
def _store_list_deltas(self):
        with self._conn as conn:
            self._run_intermediate_table_job(conn, self._create_missing_delta_storage_partitions)
        with self._conn as conn, futures.ThreadPoolExecutor(max_workers=self._nworkers) as executor:
            futures_to_cb = {}
            self._queue_delta_table_job(executor,
                                        futures_to_cb,
                                        self._store_blacklist_delta,
                                        'blacklist')
            for op in self._operators:
                self._queue_delta_table_job(executor,
                                            futures_to_cb,
                                            partial(self._store_notifications_list_delta, op.id),
                                            'notifications for {0}'.format(op.id))
                self._queue_delta_table_job(executor,
                                            futures_to_cb,
                                            partial(self._store_exceptions_list_delta, op.id),
                                            'exceptions for {0}'.format(op.id))
            self._wait_for_futures(futures_to_cb)
            with conn.cursor() as cursor:
                self._analyze_helper(cursor, self._notifications_lists_tblname)
                self._analyze_helper(cursor, self._exceptions_lists_tblname)
def _store_list_deltas ( self ) : with self . _conn as conn : self . _run_intermediate_table_job ( conn , self . _create_missing_delta_storage_partitions ) with self . _conn as conn , futures . ThreadPoolExecutor ( max_workers = self . _nworkers ) as executor : futures_to_cb = { } self . _queue_delta_table_job ( executor , futures_to_cb , self . _store_blacklist_delta , 'blacklist' ) for op in self . _operators : self . _queue_delta_table_job ( executor , futures_to_cb , partial ( self . _store_notifications_list_delta , op . id ) , 'notifications for {0}' . format ( op . id ) ) self . _queue_delta_table_job ( executor , futures_to_cb , partial ( self . _store_exceptions_list_delta , op . id ) , 'exceptions for {0}' . format ( op . id ) ) self . _wait_for_futures ( futures_to_cb ) with conn . cursor ( ) as cursor : self . _analyze_helper ( cursor , self . _notifications_lists_tblname ) self . _analyze_helper ( cursor , self . _exceptions_lists_tblname )
Write the delta lists to the real tables and update the end dates of any outdated records.
Write the delta lists to the real tables and update the end dates of any outdated records .
"""Write the delta lists to the real tables and update the end dates of any outdated records.""" # Create tables and commit immediately # ANALYZE parent tables, which analyzes children as well
self