feat: harden downstream requeue tasks
This commit is contained in:
@@ -2137,7 +2137,10 @@ model DownstreamRequeueTask {
|
||||
skippedCount Int @default(0)
|
||||
waitingCount Int @default(0)
|
||||
consecutiveFailures Int @default(0)
|
||||
applicationFailures Json @default("{}")
|
||||
lastError String?
|
||||
scanLeaseOwner String?
|
||||
scanLeaseUntil DateTime?
|
||||
createdById String?
|
||||
startedAt DateTime?
|
||||
pausedAt DateTime?
|
||||
@@ -2155,6 +2158,18 @@ model DownstreamRequeueTask {
|
||||
@@index([tenantId, createdAt])
|
||||
}
|
||||
|
||||
model DownstreamRequeueRateWindow {
|
||||
id String @id @default(cuid())
|
||||
applicationId String
|
||||
windowStartedAt DateTime
|
||||
consumed Int @default(0)
|
||||
updatedAt DateTime @updatedAt
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@unique([applicationId, windowStartedAt])
|
||||
@@index([windowStartedAt])
|
||||
}
|
||||
|
||||
model DownstreamRequeueTaskItem {
|
||||
id String @id @default(cuid())
|
||||
taskId String
|
||||
|
||||
Reference in New Issue
Block a user