@remit/search-index-worker 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/search-index-worker",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
package/src/consumer.ts CHANGED
@@ -50,10 +50,9 @@ export interface SqsConsumerConfig {
50
50
  * via `processBatch` (a batch of one) — the same per-message logic the AWS
51
51
  * Lambda handler runs, reused so the two deployment shapes (Lambda event
52
52
  * source mapping vs. a long-running container/pm2 process) share one
53
- * indexing implementation. Used by the Postgres-parity stack, where the
54
- * search-index queue has no Lambda event source; `remit-pg-index-worker`
55
- * only relays committed outbox events onto this queue (the producer side
56
- * see its `worker.ts`), it does not consume them.
53
+ * indexing implementation. Used by the self-host stack, where the search-index
54
+ * queue has no Lambda event source: the outbox drain relays committed events
55
+ * onto this queue (the producer side) and this consumer takes them off it.
57
56
  *
58
57
  * A message is deleted only when `processBatch` reports no failure for it;
59
58
  * a failure leaves it on the queue so its visibility timeout lapses and SQS
package/src/data-ports.ts CHANGED
@@ -17,11 +17,10 @@ export interface SearchIndexDataPorts {
17
17
  * one — this hook is `undefined` there, and the handler uses the message's
18
18
  * own `accountId` unchanged (see `prepareUpsert` in handler.ts).
19
19
  *
20
- * The Postgres outbox trigger fires from a plain `message_id`, so the pg
21
- * relay (`remit-pg-index-worker`) has no accountId to attach; this hook
22
- * derives it from the message's mailbox at consume time instead. Returns
23
- * null when the mailbox can't be resolved (the message is skipped, not
24
- * retried — see handler.ts).
20
+ * The outbox carries a plain `message_id`, so the relational drain has no
21
+ * accountId to attach; this hook derives it from the message's mailbox at
22
+ * consume time instead. Returns null when the mailbox can't be resolved (the
23
+ * message is skipped, not retried — see handler.ts).
25
24
  */
26
25
  resolveAccountId?: (messageId: string) => Promise<string | null>;
27
26
  }
package/src/handler.ts CHANGED
@@ -86,9 +86,8 @@ const deleteMessage = async (
86
86
  // upsert per message means a record S3 Vectors rejects (e.g. a metadata
87
87
  // ValidationException) dead-letters on its own — its siblings in the
88
88
  // batch still index instead of retrying forever behind a poison record.
89
- // Exported so the long-running Postgres consumer (`consumer.ts`) can
90
- // process one message at a time outside the Lambda batch shape, reusing
91
- // this exact logic.
89
+ // Exported so the long-running consumer (`consumer.ts`) can process one
90
+ // message at a time outside the Lambda batch shape, reusing this exact logic.
92
91
  export const upsertMessage = async (
93
92
  message: Extract<ParsedQueueMessage, { kind: "upsert" }>,
94
93
  services: Services,