Skip to content

Commit d63e8e9

Browse files
committed
same for db
1 parent 6cb1e45 commit d63e8e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/sim/lib/core/async-jobs/backends/database.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { asyncJobs, db } from '@sim/db'
22
import { createLogger } from '@sim/logger'
3-
import { eq } from 'drizzle-orm'
3+
import { eq, sql } from 'drizzle-orm'
44
import {
55
type EnqueueOptions,
66
JOB_STATUS,
@@ -71,7 +71,7 @@ export class DatabaseJobQueue implements JobQueueBackend {
7171
.set({
7272
status: JOB_STATUS.PROCESSING,
7373
startedAt: now,
74-
attempts: 1,
74+
attempts: sql`${asyncJobs.attempts} + 1`,
7575
updatedAt: now,
7676
})
7777
.where(eq(asyncJobs.id, jobId))

0 commit comments

Comments
 (0)