Skip to main content

prefect.server.utilities.postgres_listener

Functions

get_pg_notify_connection

Establishes and returns a raw asyncpg connection for LISTEN/NOTIFY. Returns None if not a PostgreSQL connection URL.

pg_listen

Listens to a specific Postgres channel and yields payloads. Manages adding and removing the listener on the given connection.