dp.redis = StrictRedis(host='localhost', port=6379, db=0)
# Wait for Redis to be ready
async def aredis_wait():
ping = False
while ping == False:
try:
ping = await dp.redis.ping()
except:
pass
logger.info(str('Redis Alive:' + str(ping)))
await asyncio.sleep(1)
asyncio.run(aredis_wait())