Closed kamikaze closed 3 years ago
Is there any example on how to manage situation when Redis sentinel connection has been lost and needs to be re-connected? In my case sentinel has same hostname but with different IP every time.
log.server_logger.info('Using {} Redis Sentinels: {}'.format(redis_name, sentinel_nodes)) sentinel = await aioredis.sentinel.create_sentinel_pool( sentinel_nodes, password=redis_conf['password'] ) log.server_logger.info('Getting {} master for {} Redis'.format(sentinel_master, redis_name)) pool: ManagedPool = sentinel.master_for(sentinel_master) pool = aioredis.Redis(pool) log.server_logger.info('Found {} master for {} Redis: {}'.format(sentinel_master, redis_name, pool))
at this point I have a pool. But when Sentinel restarts... is there any way to automagically re-establish connection? Does aioredis support this?
hello?
Is there any example on how to manage situation when Redis sentinel connection has been lost and needs to be re-connected? In my case sentinel has same hostname but with different IP every time.
at this point I have a pool. But when Sentinel restarts... is there any way to automagically re-establish connection? Does aioredis support this?