/** * PgScheduledJobStore — PostgreSQL parity for the scheduler store. * * Mirrors PgJobStore's discipline: the ScheduledJobStore interface is * SYNCHRONOUS (the scheduler calls store.save/get with no await, matching the * PostgreSQL store). PG is inherently async, so this store: * - Writes fire-and-forget (best-effort, logged on failure — matching the * PostgreSQL store's try/catch best-effort semantics). * - Reads are served from an in-memory mirror hydrated from PG on first use * (async) and kept in sync by every save. * * Uses raw SQL ($executeRaw / $queryRaw) via the shared prisma client — the * same pattern as PgJobStore and MemoryRepositoryPg — to avoid the Prisma 7.7.0 * + adapter-pg isObjectEnumValue incompatibility. Reuses getPrismaClient(). */ import type { ScheduledJob } from "./scheduler-types.js"; import type { ScheduledJobStore } from "./scheduler-store.js"; export declare class PgScheduledJobStore implements ScheduledJobStore { private prisma; private mirror; /** IDs deleted locally before/during hydration must not be resurrected. */ private localDeletes; private hydrated; private hydrating; /** Serialize mutations per job ID and expose their real settlement to tests. */ private pendingById; private pendingOperations; private getClient; /** * Best-effort hydrate the mirror from PG. Resolves (never rejects) — failures * log a warn and leave the mirror empty; the scheduler can still register jobs * in-memory and will persist them once PG is reachable. */ private ensureHydrated; private enqueueMutation; save(job: ScheduledJob): void; get(id: string): ScheduledJob | null; listAll(): ScheduledJob[]; listEnabled(): ScheduledJob[]; delete(id: string): void; /** Test helper: await in-flight writes. Not for production use. */ __drain(): Promise; } //# sourceMappingURL=scheduler-store-pg.d.ts.map