Add message
This commit is contained in:
parent
fe33b97ecd
commit
9e55f87d02
|
@ -2,6 +2,7 @@ import { AnyDocument, Database } from "@budibase/types"
|
|||
|
||||
import { JobQueue, createQueue } from "../queue"
|
||||
import * as dbUtils from "../db"
|
||||
import { logWarn } from "../logging"
|
||||
|
||||
interface ProcessDocMessage {
|
||||
dbName: string
|
||||
|
@ -26,6 +27,7 @@ class DocWritethroughProcessor {
|
|||
await this.persistToDb(message.data)
|
||||
} catch (err: any) {
|
||||
if (err.status === 409) {
|
||||
logWarn(`409 conflict in doc-writethrough cache`)
|
||||
// If we get a 409, it means that another job updated it meanwhile. We want to retry it to persist it again.
|
||||
throw new Error(`Conflict persisting message ${message.id}`)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue