1
0
Fork 0
mirror of synced 2024-07-05 22:40:39 +12:00

Use lock name

This commit is contained in:
Adria Navarro 2024-03-05 23:33:57 +01:00
parent 3dbf0b3a64
commit a9046e9f26
2 changed files with 2 additions and 1 deletions

View file

@ -51,7 +51,7 @@ docWritethroughProcessorQueue.process(async message => {
const lockResponse = await locks.doWithLock(
{
type: LockType.TRY_TWICE,
name: LockName.PERSIST_WRITETHROUGH,
name: LockName.PERSIST_DOC_WRITETHROUGH,
resource: cacheKeyPrefix,
ttl: Duration.fromSeconds(60).toMs(),
},

View file

@ -23,6 +23,7 @@ export enum LockName {
APP_MIGRATION = "app_migrations",
PROCESS_AUTO_COLUMNS = "process_auto_columns",
PROCESS_USER_INVITE = "process_user_invite",
PERSIST_DOC_WRITETHROUGH = "persist_doc_writethrough",
}
export type LockOptions = {