Skip to content

Commit

Permalink
feat: init redis before creating queue manager
Browse files Browse the repository at this point in the history
  • Loading branch information
acaldas authored and froid1911 committed May 28, 2024
1 parent b191757 commit ace01dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/src/modules/document/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { BaseQueueManager } from 'document-drive/queue/base';
import { init } from './listenerManager';
import { getChildLogger } from '../../logger';
import DocumentDriveError from '../../errors/DocumentDriveError';
import { redisClient } from '../../redis';
import { initRedis } from '../../redis';
// import { ScopeOfWorkAction, ScopeOfWorkDocument } from '../../../../../document-model-libs/dist/document-models/scope-of-work';

const logger = getChildLogger({ msgPrefix: 'Document Model' });
Expand All @@ -45,6 +45,8 @@ const loggerAdapter = new Proxy<ILogger>(documentDriveLogger as unknown as ILogg
});
setLogger(loggerAdapter);

const redisClient = process.env.REDIS_TLS_URL ? await initRedis() : undefined;

export function getDocumentDriveCRUD(prisma: Prisma.TransactionClient) {
const documentModels = [
DocumentModelLib,
Expand Down

0 comments on commit ace01dd

Please sign in to comment.