def connect(self):
try:
await self._connect()
except Exception as exc:
raise ConnectionError()
# run any user callbacks. right now the only internal callback
# is for pubsub channel/pattern resubscription
for callback in self._connect_callbacks:
task = callback(self)
if isinstance(task, typing.Awaitable):
await task
评论列表
文章目录