Infinite retries

This commit is contained in:
Adria Navarro 2024-03-07 11:11:36 +01:00
parent 977daff05c
commit 440dcb244d
1 changed files with 7 additions and 4 deletions

View File

@ -2,20 +2,23 @@ import { AnyDocument, Database, LockName, LockType } from "@budibase/types"
import { JobQueue, createQueue } from "../queue"
import * as dbUtils from "../db"
import { string } from "yargs"
import { db } from ".."
import { locks } from "../redis"
import { Duration } from "../utils"
interface ProcessDocMessage {
dbName: string
docId: string
data: Record<string, any>
}
export const docWritethroughProcessorQueue = createQueue<ProcessDocMessage>(
JobQueue.DOC_WRITETHROUGH_QUEUE
JobQueue.DOC_WRITETHROUGH_QUEUE,
{
jobOptions: {
// We might have plenty of 409, we want to allow running almost infinitely
attempts: Number.MAX_SAFE_INTEGER,
},
}
)
class DocWritethroughProcessor {