refactor: remove catalog sync jobs and version history
This commit is contained in:
@@ -9,7 +9,6 @@ import {
|
||||
processOutboxEvent,
|
||||
} from "@/lib/outbox/processor";
|
||||
import { closeRedisClient, getRedisClient } from "@/lib/redis/client";
|
||||
import { claimCatalogSyncJob, processCatalogSyncJob } from "@/lib/catalog/sync";
|
||||
|
||||
let stopping = false;
|
||||
const stop = () => {
|
||||
@@ -41,15 +40,6 @@ async function run(): Promise<void> {
|
||||
const leaseMs = positiveInteger("OUTBOX_LEASE_MS", 30_000, 300_000);
|
||||
|
||||
while (!stopping) {
|
||||
const catalogJob = await claimCatalogSyncJob();
|
||||
if (catalogJob) {
|
||||
try {
|
||||
await processCatalogSyncJob(catalogJob.id);
|
||||
} catch (cause) {
|
||||
console.error("Catalog sync failed", cause);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
const events = await claimOutboxEvents(batchSize, leaseMs);
|
||||
if (events.length === 0) {
|
||||
await wait(pollMs);
|
||||
|
||||
Reference in New Issue
Block a user