diff --git a/api/package.json b/api/package.json index f396fd58..bb937224 100644 --- a/api/package.json +++ b/api/package.json @@ -23,8 +23,8 @@ "body-parser": "^1.20.2", "cookie-parser": "^1.4.6", "cors": "^2.8.5", - "document-drive": "1.0.0-alpha.54", - "document-model": "^1.0.55", + "document-drive": "1.0.0-experimental.4", + "document-model": "1.1.0-experimental.1", "document-model-libs": "^1.42.0", "dotenv": "^16.4.5", "ethers": "^5.7.2", diff --git a/api/pnpm-lock.yaml b/api/pnpm-lock.yaml index 02d4b22b..dabf6935 100644 --- a/api/pnpm-lock.yaml +++ b/api/pnpm-lock.yaml @@ -30,11 +30,11 @@ dependencies: specifier: ^2.8.5 version: 2.8.5 document-drive: - specifier: 1.0.0-alpha.54 - version: 1.0.0-alpha.54(document-model-libs@1.42.0)(document-model@1.0.55)(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.0.55 - version: 1.0.55 + specifier: 1.1.0-experimental.1 + version: 1.1.0-experimental.1 document-model-libs: specifier: ^1.42.0 version: 1.42.0(graphql@16.8.1)(react-dom@18.2.0)(react@18.2.0)(vitest@0.32.4) @@ -4838,14 +4838,14 @@ packages: esutils: 2.0.3 dev: true - /document-drive@1.0.0-alpha.54(document-model-libs@1.42.0)(document-model@1.0.55)(prisma@5.11.0): - resolution: {integrity: sha512-cb4zb7DdXzRKwmhKYIABEAd4Mr5tY3bpJ5QytBEhguQ6Sk7qBqGr7q7WobO9sTsT490NUfTCRmKgzEgl7DaDpA==} + /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.0.53 + document-model: 1.1.0-experimental.1 document-model-libs: ^1.37.0 dependencies: - document-model: 1.0.55 - document-model-libs: 1.42.0(graphql@16.8.1)(react-dom@18.2.0)(react@18.2.0)(vitest@0.32.4) + document-model: 1.1.0-experimental.1 + document-model-libs: 1.41.0(graphql@16.8.1)(react-dom@18.2.0)(react@18.2.0)(vitest@0.32.4) exponential-backoff: 3.1.1 graphql: 16.8.1 graphql-request: 6.1.0(graphql@16.8.1) @@ -4904,8 +4904,8 @@ packages: - vitest dev: false - /document-model@1.0.55: - resolution: {integrity: sha512-M066OPLou5uNV/XJzSBs7wv4zx9P8PYPbb4Nf1u6sG0QRsmKn3m35PINvHA7XXiwWKKUSBLoWSITDmpGphhjFw==} + /document-model@1.1.0-experimental.1: + resolution: {integrity: sha512-5xO3T/vGu1g8UeJGZVokVBr+/GfJDmDSYMkrA/6POmJawF+pZ9GkoudsDWi6CjXuNMWc/ejHWbTV68S+dudKkw==} dependencies: change-case: 5.4.4 immer: 10.0.4 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();