mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 13:01:00 +00:00
test(jobs): re-pin the pg-boss retention assumptions to 12.34.0
This commit is contained in:
1 parent
891db1753e
commit
6f6c4ffff0
2 files changed
+6
-3
No files matched your search
@@ -16,12 +16,15 @@ describe("pg-boss failed-row ledger retention", () => {
|
||||
) as { version: string };
|
||||
const plans = readFileSync(join(PG_BOSS_ROOT, "dist/plans.js"), "utf8");
|
||||
|
||||
expect(packageJson.version).toBe("12.27.0");
|
||||
expect(packageJson.version).toBe("12.34.0");
|
||||
expect(plans).toContain("retention_seconds: FORTEEN_DAYS");
|
||||
expect(plans).toContain("deletion_seconds: SEVEN_DAYS");
|
||||
// 12.34 reads the clock through job_now(), which is pg_catalog.now()
|
||||
// unless a test clock opts in, so the seven-day deletion is unchanged.
|
||||
expect(plans).toContain(
|
||||
"completed_on + deletion_seconds * interval '1s' < now()",
|
||||
"completed_on + deletion_seconds * interval '1s' < ${schema}.job_now()",
|
||||
);
|
||||
expect(plans).toContain("CLOCK_FUNCTION_BODY = 'SELECT pg_catalog.now();'");
|
||||
expect(JOB_FAILURE_WINDOW_HOURS).toBeLessThan(
|
||||
PG_BOSS_FAILED_ROW_AVAILABILITY_HOURS,
|
||||
);
|
||||
|
||||
@@ -28,7 +28,7 @@ import { prisma } from "@/lib/db";
|
||||
import { redactSecrets } from "@/lib/logging/redact";
|
||||
|
||||
/**
|
||||
* pg-boss 12.26.0 stores terminal rows until
|
||||
* pg-boss 12.34.0 stores terminal rows until
|
||||
* `completed_on + deletion_seconds` (`dist/plans.js`). Its queue default is
|
||||
* 604800 seconds, while `retention_seconds` defaults to 1209600 seconds; job
|
||||
* insertion copies those queue values and maintenance applies the terminal-row
|
||||
|
||||
Reference in new issue
Block a user