@teamscala/service-boot 0.23.511 → 0.23.512
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/pg-boss-mount.test.ts +4 -3
- package/src/pg-boss-mount.ts +10 -4
package/package.json
CHANGED
|
@@ -82,7 +82,8 @@ describe("mountPgBoss poll-only contract", () => {
|
|
|
82
82
|
packages: ["@teamscala/sync-worker"],
|
|
83
83
|
});
|
|
84
84
|
|
|
85
|
-
const
|
|
85
|
+
const capturedOpts = captured as unknown as CapturedOpts | undefined;
|
|
86
|
+
const connectionString = capturedOpts?.connectionString ?? "";
|
|
86
87
|
// The transaction pooler, exactly as injected — the mount adds no
|
|
87
88
|
// endpoint derivation.
|
|
88
89
|
expect(connectionString).toContain(":6543");
|
|
@@ -93,8 +94,8 @@ describe("mountPgBoss poll-only contract", () => {
|
|
|
93
94
|
// The pg sslmode dialect rewrite still applies.
|
|
94
95
|
expect(connectionString).toContain("sslmode=no-verify");
|
|
95
96
|
// Poll-only, spelled: no LISTEN dependency, now and after a bump.
|
|
96
|
-
expect(
|
|
97
|
+
expect(capturedOpts?.useListenNotify).toBe(false);
|
|
97
98
|
// pg-boss stays a single sibling connection (pool sizing doctrine).
|
|
98
|
-
expect(
|
|
99
|
+
expect(capturedOpts?.max).toBe(1);
|
|
99
100
|
});
|
|
100
101
|
});
|
package/src/pg-boss-mount.ts
CHANGED
|
@@ -196,10 +196,15 @@ export async function mountPgBoss(
|
|
|
196
196
|
// unavailable" (logged + event-log row), NEVER a boot-crash. A bare
|
|
197
197
|
// pg-boss assert reaching boot is the violation.
|
|
198
198
|
let config: ScheduledJobConfig;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
// validateRow returns a RESULT WRAPPER ({ok:true,value}|{ok:false,issues}),
|
|
200
|
+
// never the config itself — measured 2026-09-16: assigning the wrapper as
|
|
201
|
+
// the config left queue_name/handler_slug undefined and silently skipped
|
|
202
|
+
// EVERY row on services holding db-validation 0.1.289+.
|
|
203
|
+
const validated = validateRow("scheduled_job", entry.config);
|
|
204
|
+
if (!validated.ok) {
|
|
205
|
+
const reason = validated.issues
|
|
206
|
+
.map((i) => `${String(i.path?.map((p) => String(p.key)).join(".") ?? "")}: ${i.message}`)
|
|
207
|
+
.join("; ");
|
|
203
208
|
log.error(
|
|
204
209
|
`[pg-boss-mount:${ctx.serviceSlug}] scheduled_job "${entry.slug}" failed schema validation — skipping`,
|
|
205
210
|
{ reason },
|
|
@@ -210,6 +215,7 @@ export async function mountPgBoss(
|
|
|
210
215
|
});
|
|
211
216
|
continue;
|
|
212
217
|
}
|
|
218
|
+
config = validated.value as ScheduledJobConfig;
|
|
213
219
|
if (!config.queue_name || !config.handler_slug) {
|
|
214
220
|
log.error(
|
|
215
221
|
`[pg-boss-mount:${ctx.serviceSlug}] scheduled_job "${entry.slug}" missing queue_name or handler_slug — skipping`,
|