From c04c06ebb61591e99fe78f777d5298e3ffa98365 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Fri, 25 Oct 2024 15:51:46 +0700 Subject: [PATCH] checkpoint fix --- src/controllers/PermissionController.ts | 4 +--- src/services/rabbitmq.ts | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/controllers/PermissionController.ts b/src/controllers/PermissionController.ts index 481a831f..80791a34 100644 --- a/src/controllers/PermissionController.ts +++ b/src/controllers/PermissionController.ts @@ -746,7 +746,6 @@ export class PermissionController extends Controller { public async checkOrg( @Path() keycloakId: string, ) { - console.log("[In Func]"); const redisClient = await this.redis.createClient({ host: REDIS_HOST, port: REDIS_PORT, @@ -758,7 +757,6 @@ export class PermissionController extends Controller { select: ["id"], where: { keycloak: keycloakId }, }); - console.log("[In Func Query Profile]",profile); // if (!profile) { // profileType = "EMPLOYEE"; // profile = await this.profileEmployeeRepo.findOne({ @@ -801,7 +799,7 @@ export class PermissionController extends Controller { orgChild4Id: posMaster.orgChild4Id, }; } - redisClient.setex("org_" + profile.id, 86400, JSON.stringify(reply)); + redisClient.setex("org_" + profile.id, 86400, JSON.stringify(reply)); //Create Redis // } else { // const posMaster = await this.posMasterEmpRepository.findOne({ // where: { diff --git a/src/services/rabbitmq.ts b/src/services/rabbitmq.ts index 1ad374b4..39be698d 100644 --- a/src/services/rabbitmq.ts +++ b/src/services/rabbitmq.ts @@ -32,14 +32,14 @@ export async function init() { }); }; - sendToQueueOrg = (payload: any, persistent = true) => { - channel.sendToQueue(queue_org, Buffer.from(JSON.stringify(payload)), { persistent }); - }; + // sendToQueueOrg = (payload: any, persistent = true) => { + // channel.sendToQueue(queue_org, Buffer.from(JSON.stringify(payload)), { persistent }); + // }; console.log("[AMQ] Listening for message..."); createConsumer(queue, channel, handler); //----> (3) Process Consumer - createConsumer(queue_org, channel, handler_org); + // createConsumer(queue_org, channel, handler_org); // createConsumer(queue2, channel, handler2); }