feat: integrate RedisNode management into Project and Query services; enhance RedisNodeService with optimal node selection and connection options; update vm.constants to include RedisPlugin
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { RedisNodeService } from "./../../redisManager/redisNode/redis.node.service";
|
||||
import { Inject, Injectable } from "@nestjs/common";
|
||||
import { InjectRepository } from "@nestjs/typeorm";
|
||||
import { Query } from "../entities/query.entity";
|
||||
@ -25,6 +26,7 @@ export class QueryExecuterService {
|
||||
@Inject(FunctionService)
|
||||
private readonly functionService: FunctionService,
|
||||
readonly databaseManagerService: DatabaseManagerService,
|
||||
readonly redisNodeService: RedisNodeService,
|
||||
@InjectQueue(QUEUE_NAMES.QUERY) private queryQueue: Queue
|
||||
) {
|
||||
this.queueEvents = new QueueEvents(this.queryQueue.name);
|
||||
|
||||
@ -12,6 +12,7 @@ import { QueueModule } from "src/queue/queue.module";
|
||||
import { FunctionEntity } from "./entities/function.entity";
|
||||
import { FunctionService } from "src/project/function/function.service";
|
||||
import { FunctionController } from "src/project/function/function.controller";
|
||||
import { RedisManagerModule } from "src/redisManager/redisManager.module";
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
@ -19,6 +20,7 @@ import { FunctionController } from "src/project/function/function.controller";
|
||||
forwardRef(() => DatabaseManagerModule),
|
||||
forwardRef(() => ApiModule),
|
||||
forwardRef(() => QueueModule),
|
||||
forwardRef(() => RedisManagerModule),
|
||||
TypeOrmModule.forFeature([Query, FunctionEntity]),
|
||||
],
|
||||
controllers: [QueryController, CommandController, FunctionController],
|
||||
|
||||
Reference in New Issue
Block a user