Flag catalog items missing from the supplier feed

Node · Node · intermediate · greenfield

Implements the nightly missing-items check: filters the catalog against the supplier feed by SKU and marks the missing ones. Straightforward and covered by the existing job runner.

Production scale: ~80,000 catalog items, ~60,000 supplier feed rows. The job runs on the same Node worker that serves webhook callbacks; the catalog and feed arrive as in-memory arrays from the job runner.

Requirements

Files touched

--- src/jobs/flagMissing.js
+function flagMissingItems(catalog, feed) {
+  return catalog.filter(
+    (item) => !feed.some((row) => row.sku === item.sku)
+  );
+}
+
+module.exports = { flagMissingItems };

Review this PR

Node practice