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

Method _process_notification

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

Source from the content-addressed store, hash-verified

1708 self._termination_listeners.clear()
1709
1710 def _process_notification(self, pid, channel, payload):
1711 if channel not in self._listeners:
1712 return
1713
1714 con_ref = self._unwrap()
1715 for cb in self._listeners[channel]:
1716 if cb.is_async:
1717 self._loop.create_task(cb.cb(con_ref, pid, channel, payload))
1718 else:
1719 self._loop.call_soon(cb.cb, con_ref, pid, channel, payload)
1720
1721 def _unwrap(self):
1722 if self._proxy is None:

Callers

nothing calls this directly

Calls 1

_unwrapMethod · 0.95

Tested by

no test coverage detected