INNER CODE UNIT · Python
finalize
psevensas/DjangoChannelsGraphqlWs · channels_graphql_ws/client.py:250
async def finalize(self):
"""Disconnect and wait the transport to finish gracefully."""
await self._transport.disconnect()
self._is_connected = False
async def wait_response(self, response_checker, timeout=None):
"""Wait for particular response skipping all intermediate ones.
Useful when you need to need to wait until subscription reports
desired state or skip subscription messages between request and
response.
Args:
response_checker: Function with accepts GraphQL response as
single parameter and must return `True` for desired
response and `False` the other responses.
timeout: Seconds to wait until response is received.