コード例 #1
0
ファイル: conftest.py プロジェクト: kerick91/Cloud-Init
async def redis_cache() -> typing.AsyncGenerator[utils.RedisCache, None]:
    with utils.aredis_for_cache() as client:
        await client.flushdb()
        try:
            yield client
        finally:
            await client.flushdb()
            client.connection_pool.disconnect()
            await utils.stop_pending_aredis_tasks()
コード例 #2
0
ファイル: base.py プロジェクト: jsoref/mergify-engine
 async def clear_redis_cache():
     with utils.aredis_for_cache() as redis_stream:
         await redis_stream.flushall()