MCPcopy Create free account
hub / github.com/Effect-TS/effect / onNotification

Function onNotification

packages/sql/pg/src/PgClient.ts:624–628  ·  view source on GitHub ↗
(msg: Pg.Notification)

Source from the content-addressed store, hash-verified

622 Stream.callback<string, SqlError>(Effect.fnUntraced(function*(queue) {
623 const client = yield* options.listenAcquirer
624 function onNotification(msg: Pg.Notification) {
625 if (msg.channel === channel && msg.payload) {
626 Queue.offerUnsafe(queue, msg.payload)
627 }
628 }
629 yield* Effect.addFinalizer(() =>
630 Effect.promise(() => {
631 client.off("notification", onNotification)

Callers

nothing calls this directly

Calls 1

offerUnsafeMethod · 0.80

Tested by

no test coverage detected