src/dirbs/listgen/generator.py
def _create_missing_notifications_partition_indices(self, conn, operator_id):
        """Called to ensure that indices are created on notifications lists partitions."""
        with CodeProfiler() as cp:
            tbl_name = self._notifications_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 notifications lists partitions.
Called to ensure that indices are created on notifications lists partitions.
Called to ensure that indices are created on notifications lists partitions .
def _create_missing_notifications_partition_indices(self, conn, operator_id):
        with CodeProfiler() as cp:
            tbl_name = self._notifications_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_notifications_partition_indices ( self , conn , operator_id ) : with CodeProfiler ( ) as cp : tbl_name = self . _notifications_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 notifications lists partitions.
Called to ensure that indices are created on notifications lists partitions .
"""Called to ensure that indices are created on notifications lists partitions."""
self
conn
operator_id