feat: batch large source imports

This commit is contained in:
2026-07-19 05:43:03 +08:00
parent 591981b7c8
commit 9e159910ca
8 changed files with 40 additions and 29 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import { db } from "@/lib/db";
export type SyncTrigger = "manual" | "webhook" | "scheduled" | "source-created";
export type SyncTrigger = "manual" | "webhook" | "scheduled" | "source-created" | "batch";
/** Queue one pull per source at a time. Returns true only when a new job was created. */
export function queuePull(sourceId: number, trigger: SyncTrigger, payload: unknown = {}) {