def _ensure_indexes(self, database):
        messages = database[self.messages_collection]
        messages.ensure_index(
            [('queue', 1), ('priority', 1), ('_id', 1)], background=True,
        )

        database[self.broadcast_collection].ensure_index([('queue', 1)])

        routing = database[self.routing_collection]
        routing.ensure_index([('queue', 1), ('exchange', 1)])

        if self.ttl:
            messages.ensure_index([('expire_at', 1)], expireAfterSeconds=0)
            routing.ensure_index([('expire_at', 1)], expireAfterSeconds=0)

            database[self.queues_collection].ensure_index(
                [('expire_at', 1)], expireAfterSeconds=0)
Abort any ongoing transfers and clear all buffers
dataset/ETHPy150Open celery/kombu/kombu/transport/mongodb.py/Channel._ensure_indexes--crossover with--dataset/ETHPy150Open mbedmicro/pyOCD/pyOCD/pyDAPAccess/dap_access_usb.py/DAPAccessUSB._abort_all_transfers