Esempio n. 1
0
    async def _clear_indexes(_id: str, db: AioRedis):
        """
        clears secondary indexes

        @param id: id of entity
        @param db: redis instance
        """
        coroutines = []
        for index in [endpoint_cache_service_id_index]:
            coroutines.append(db.hdel(index, _id))
        await Async.all(coroutines)
Esempio n. 2
0
    async def _clear_indexes(_id: str, db: AioRedis):
        """
        clears secondary indexes

        @param id: id of entity
        @param db: redis instance
        """
        coroutines = []
        for index in [
                rule_status_code_index,
                rule_service_id_index,
                entry_rule_id_index,
                entry_host_index]:
            coroutines.append(db.hdel(index, _id))
        await Async.all(coroutines)