We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi @miguelgrinberg ! when my redis is crash.pub,sub will not reactivate. i try repair in asyncio_redis_manage.py. The following code:
async def _publish(self, data): if self.pub is None: self.pub = await aioredis.create_redis((self.host, self.port), db=self.db, password=self.password) try: await self.pub.ping() except: self.pub = await aioredis.create_redis((self.host, self.port), db=self.db, password=self.password) return await self.pub.publish(self.channel, pickle.dumps(data)) async def _listen(self): if self.sub is None: self.sub = await aioredis.create_redis((self.host, self.port), db=self.db, password=self.password) self.ch = (await self.sub.subscribe(self.channel))[0] while True: try: return await self.ch.get() except: value=True while value: try: self.sub = await aioredis.create_redis((self.host, self.port), db=self.db, password=self.password) value=False except: pass self.ch = (await self.sub.subscribe(self.channel))[0] return await self.ch.get()
The text was updated successfully, but these errors were encountered:
I'll look into this. The generic except clauses need to be made more specific, but I think I understand what problem is anyway.
except
Sorry, something went wrong.
When my redis server is suspended, restart success will not receive pub information again.
af13ef0
@Larry-Dev can I ask you to test the master branch of this package and let me know if your problems with reconnecting to redis are addressed?
miguelgrinberg
No branches or pull requests
Hi @miguelgrinberg !
when my redis is crash.pub,sub will not reactivate.
i try repair in asyncio_redis_manage.py.
The following code:
The text was updated successfully, but these errors were encountered: