From b86a4216cf1b5f55b43f41191900972b662ce0bf Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 27 Dec 2022 13:07:07 +1100 Subject: [PATCH] comments --- api/src/notify.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/src/notify.ts b/api/src/notify.ts index c9d306f..a353b2e 100644 --- a/api/src/notify.ts +++ b/api/src/notify.ts @@ -12,6 +12,10 @@ export default function createNotify(log: Log, pg: Pg, events) { const subscriber = createSubscriber({ connectionString: process.env.DATABASE_URL }); + // pg has a hard limit of 8000B for the notification payload + // so we only receive the ids of the updated record + // and go fetch the whole thing to figure out who to notify + async function handleOffers(payload) { const { action, id } = payload; log.info({ channel: OFFERS_CHANNEL, action, id });