We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6cb1e45 commit d63e8e9Copy full SHA for d63e8e9
apps/sim/lib/core/async-jobs/backends/database.ts
@@ -1,6 +1,6 @@
1
import { asyncJobs, db } from '@sim/db'
2
import { createLogger } from '@sim/logger'
3
-import { eq } from 'drizzle-orm'
+import { eq, sql } from 'drizzle-orm'
4
import {
5
type EnqueueOptions,
6
JOB_STATUS,
@@ -71,7 +71,7 @@ export class DatabaseJobQueue implements JobQueueBackend {
71
.set({
72
status: JOB_STATUS.PROCESSING,
73
startedAt: now,
74
- attempts: 1,
+ attempts: sql`${asyncJobs.attempts} + 1`,
75
updatedAt: now,
76
})
77
.where(eq(asyncJobs.id, jobId))
0 commit comments