@teamscala/service-boot 0.23.550 → 0.23.552
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.ts +3 -3
package/package.json
CHANGED
package/src/pg-boss-mount.ts
CHANGED
|
@@ -80,7 +80,7 @@ async function resolveHandler(
|
|
|
80
80
|
|
|
81
81
|
async function recordFire(jobSlug: string, queueName: string): Promise<string | null> {
|
|
82
82
|
try {
|
|
83
|
-
const row = await getPrisma().
|
|
83
|
+
const row = await getPrisma().scheduled_job_runs.create({
|
|
84
84
|
data: { job_slug: jobSlug, queue_name: queueName, status: "active", attempt: 1 },
|
|
85
85
|
});
|
|
86
86
|
return String(row.id);
|
|
@@ -101,7 +101,7 @@ async function recordOutcome(
|
|
|
101
101
|
): Promise<void> {
|
|
102
102
|
if (runId === null) return;
|
|
103
103
|
try {
|
|
104
|
-
await getPrisma().
|
|
104
|
+
await getPrisma().scheduled_job_runs.update({
|
|
105
105
|
where: { id: runId },
|
|
106
106
|
data: { status, completed_at: new Date(), error, result },
|
|
107
107
|
});
|
|
@@ -115,7 +115,7 @@ async function recordOutcome(
|
|
|
115
115
|
async function expirePriorProcessRuns(slugs: string[]): Promise<void> {
|
|
116
116
|
for (const slug of slugs) {
|
|
117
117
|
try {
|
|
118
|
-
await getPrisma().
|
|
118
|
+
await getPrisma().scheduled_job_runs.updateMany({
|
|
119
119
|
where: { job_slug: slug, status: "active" },
|
|
120
120
|
data: {
|
|
121
121
|
status: "expired",
|