Skip to content

Commit

Permalink
feat: activated redis queue manager
Browse files Browse the repository at this point in the history
  • Loading branch information
froid1911 authored and gpuente committed May 8, 2024
1 parent a805aab commit 05b7dc2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions api/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion api/src/modules/document/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 05b7dc2

Please sign in to comment.