src/dirbs/listgen/generator.py
def _create_missing_exceptions_partition_indices(self, conn, operator_id):
        """Called to ensure that indices are created on exceptions lists partitions."""
        with CodeProfiler() as cp:
            tbl_name = self._exceptions_lists_part_tblname(operator_id)
            idx_metadata = [partition_utils.IndexMetadatum(idx_cols=['start_run_id']),
                            partition_utils.IndexMetadatum(idx_cols=['end_run_id']),
                            partition_utils.IndexMetadatum(idx_cols=['imei_norm', 'imsi', 'msisdn'],
                                                           is_unique=True,
                                                           partial_sql='WHERE end_run_id IS NULL')]
            partition_utils.add_indices(conn, tbl_name=tbl_name, idx_metadata=idx_metadata, if_not_exists=True)

        return -1, cp.duration
Called to ensure that indices are created on exceptions lists partitions.
Called to ensure that indices are created on exceptions lists partitions.
Called to ensure that indices are created on exceptions lists partitions .
def _create_missing_exceptions_partition_indices(self, conn, operator_id):
        with CodeProfiler() as cp:
            tbl_name = self._exceptions_lists_part_tblname(operator_id)
            idx_metadata = [partition_utils.IndexMetadatum(idx_cols=['start_run_id']),
                            partition_utils.IndexMetadatum(idx_cols=['end_run_id']),
                            partition_utils.IndexMetadatum(idx_cols=['imei_norm', 'imsi', 'msisdn'],
                                                           is_unique=True,
                                                           partial_sql='WHERE end_run_id IS NULL')]
            partition_utils.add_indices(conn, tbl_name=tbl_name, idx_metadata=idx_metadata, if_not_exists=True)
        return -1, cp.duration
def _create_missing_exceptions_partition_indices ( self , conn , operator_id ) : with CodeProfiler ( ) as cp : tbl_name = self . _exceptions_lists_part_tblname ( operator_id ) idx_metadata = [ partition_utils . IndexMetadatum ( idx_cols = [ 'start_run_id' ] ) , partition_utils . IndexMetadatum ( idx_cols = [ 'end_run_id' ] ) , partition_utils . IndexMetadatum ( idx_cols = [ 'imei_norm' , 'imsi' , 'msisdn' ] , is_unique = True , partial_sql = 'WHERE end_run_id IS NULL' ) ] partition_utils . add_indices ( conn , tbl_name = tbl_name , idx_metadata = idx_metadata , if_not_exists = True ) return - 1 , cp . duration
Called to ensure that indices are created on exceptions lists partitions.
Called to ensure that indices are created on exceptions lists partitions .
"""Called to ensure that indices are created on exceptions lists partitions."""
self
conn
operator_id