Skip to content

Commit 5d6fa6f

Browse files
committed
add missing processAt to prisma-adapter/addJobs
1 parent 7e3f077 commit 5d6fa6f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/adapter-drizzle/src/postgres-adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class PostgresQueueAdapter extends BaseQueueAdapter {
8989
attempts: job.attempts,
9090
maxAttempts: job.maxAttempts,
9191
timeout: job.timeout,
92-
processAt: sql`${new Date().toISOString()}::timestamptz`,
92+
processAt: sql`${asUtc(new Date()).toISOString()}::timestamptz`,
9393
cron: null,
9494
repeatEvery: null,
9595
repeatLimit: null,

packages/adapter-prisma/src/postgres-adapter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { BaseJob, BatchJob, JobStatus, QueueStats, SerializedError } from "@vorsteh-queue/core"
2-
import { BaseQueueAdapter, serializeError } from "@vorsteh-queue/core"
2+
import { asUtc, BaseQueueAdapter, serializeError } from "@vorsteh-queue/core"
33

44
import type { PrismaClient, PrismaClientInternal } from "../types"
55
import type { QueueJobModel as QueueJob } from "./generated/prisma/models"
@@ -84,6 +84,7 @@ export class PostgresPrismaQueueAdapter extends BaseQueueAdapter {
8484
status: job.status,
8585
priority: job.priority,
8686
attempts: job.attempts,
87+
processAt: asUtc(new Date()),
8788
maxAttempts: job.maxAttempts,
8889
progress: job.progress ?? 0,
8990
timeout: job.timeout,

0 commit comments

Comments
 (0)