MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / _process_notification

Method _process_notification

asyncpg/connection.py:1741–1750  ·  view source on GitHub ↗
(self, pid, channel, payload)

Source from the content-addressed store, hash-verified

1739 self._termination_listeners.clear()
1740
1741 def _process_notification(self, pid, channel, payload):
1742 if channel not in self._listeners:
1743 return
1744
1745 con_ref = self._unwrap()
1746 for cb in self._listeners[channel]:
1747 if cb.is_async:
1748 self._loop.create_task(cb.cb(con_ref, pid, channel, payload))
1749 else:
1750 self._loop.call_soon(cb.cb, con_ref, pid, channel, payload)
1751
1752 def _unwrap(self):
1753 if self._proxy is None:

Callers

nothing calls this directly

Calls 1

_unwrapMethod · 0.95

Tested by

no test coverage detected