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 });