diff --git a/api/package.json b/api/package.json index 78ef4600..bb937224 100644 --- a/api/package.json +++ b/api/package.json @@ -23,7 +23,7 @@ "body-parser": "^1.20.2", "cookie-parser": "^1.4.6", "cors": "^2.8.5", - "document-drive": "1.0.0-experimental.2", + "document-drive": "1.0.0-experimental.4", "document-model": "1.1.0-experimental.1", "document-model-libs": "^1.42.0", "dotenv": "^16.4.5", diff --git a/api/pnpm-lock.yaml b/api/pnpm-lock.yaml index 0554e701..dabf6935 100644 --- a/api/pnpm-lock.yaml +++ b/api/pnpm-lock.yaml @@ -30,8 +30,8 @@ dependencies: specifier: ^2.8.5 version: 2.8.5 document-drive: - specifier: 1.0.0-experimental.2 - version: 1.0.0-experimental.2(document-model-libs@1.41.0)(document-model@1.1.0-experimental.1)(prisma@5.11.0) + specifier: 1.0.0-experimental.4 + version: 1.0.0-experimental.4(document-model-libs@1.41.0)(document-model@1.1.0-experimental.1)(prisma@5.11.0) document-model: specifier: 1.1.0-experimental.1 version: 1.1.0-experimental.1 @@ -4838,8 +4838,8 @@ packages: esutils: 2.0.3 dev: true - /document-drive@1.0.0-experimental.2(document-model-libs@1.41.0)(document-model@1.1.0-experimental.1)(prisma@5.11.0): - resolution: {integrity: sha512-jDfwNed90JcWuuRXhmtHuYb3thu2jjgUcT5dmHTQVMJDKemSNhzjxjx2Q8hEKDLVTMfYUaN3+cDwN8+zFfFQDA==} + /document-drive@1.0.0-experimental.4(document-model-libs@1.41.0)(document-model@1.1.0-experimental.1)(prisma@5.11.0): + resolution: {integrity: sha512-5by4zaGGcE+k1/vNUgR+K56bHBMfI0Rc6t5xww7hwP9wt0jh4jxLMmP6VWFVg0BMX/kbQqb4CEdsGFyD5vadgA==} peerDependencies: document-model: 1.1.0-experimental.1 document-model-libs: ^1.37.0 diff --git a/api/src/modules/document/model.ts b/api/src/modules/document/model.ts index 3bb38e01..4a47a34c 100644 --- a/api/src/modules/document/model.ts +++ b/api/src/modules/document/model.ts @@ -20,6 +20,8 @@ import { } from 'document-model-libs/document-drive'; import RedisCache from 'document-drive/cache/redis'; import MemoryCache from 'document-drive/cache/memory'; +import { RedisQueueManager } from 'document-drive/queue/redis'; +import { BaseQueueManager } from 'document-drive/queue/base'; import { init } from './listenerManager'; import { getChildLogger } from '../../logger'; @@ -52,7 +54,8 @@ export function getDocumentDriveCRUD(prisma: Prisma.TransactionClient) { driveServer = new DocumentDriveServer( documentModels, new PrismaStorage(prisma as PrismaClient), - redisClient ? new RedisCache(redisClient) : new MemoryCache() + redisClient ? new RedisCache(redisClient) : new MemoryCache(), + redisClient ? new RedisQueueManager(3, 10, redisClient) : new BaseQueueManager(3, 10), ); initialize();