From 18cfb937189bd85c2411b74067fcc5158a7209e0 Mon Sep 17 00:00:00 2001 From: madan v Date: Fri, 1 Nov 2024 02:00:13 +0530 Subject: [PATCH] feat: disable forestadmin for prod app crash --- apps/web-api/src/main.ts | 2 +- .../participants-request/participants-request.service.ts | 8 ++++---- .../src/utils/forest-admin/reset-cache-after-cud.ts | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/web-api/src/main.ts b/apps/web-api/src/main.ts index c2ab459b3..74994ec85 100644 --- a/apps/web-api/src/main.ts +++ b/apps/web-api/src/main.ts @@ -34,7 +34,7 @@ export async function bootstrap() { process.env.ENVIRONMENT === APP_ENV.STAGING, }); - await agent.mountOnNestJs(app).start(); + //await agent.mountOnNestJs(app).start(); await app.listen(process.env.PORT || 3000); } diff --git a/apps/web-api/src/participants-request/participants-request.service.ts b/apps/web-api/src/participants-request/participants-request.service.ts index 295954cff..94e0612e2 100644 --- a/apps/web-api/src/participants-request/participants-request.service.ts +++ b/apps/web-api/src/participants-request/participants-request.service.ts @@ -404,7 +404,7 @@ export class ParticipantsRequestService { }?utm_source=notification&utm_medium=slack&utm_code=${getRandomId()}`; await this.slackService.notifyToChannel(slackConfig); await this.cacheService.reset() - await this.forestAdminService.triggerAirtableSync(); + //await this.forestAdminService.triggerAirtableSync(); return { code: 1, message: 'Success' }; } @@ -571,7 +571,7 @@ export class ParticipantsRequestService { } ); } - await this.forestAdminService.triggerAirtableSync(); + //await this.forestAdminService.triggerAirtableSync(); return { code: 1, message: 'Success' }; } @@ -862,7 +862,7 @@ export class ParticipantsRequestService { }?utm_source=notification&utm_medium=slack&utm_code=${getRandomId()}`; await this.slackService.notifyToChannel(slackConfig); await this.cacheService.reset() - await this.forestAdminService.triggerAirtableSync(); + //await this.forestAdminService.triggerAirtableSync(); return { code: 1, message: 'Success' }; } @@ -1008,7 +1008,7 @@ export class ParticipantsRequestService { await this.slackService.notifyToChannel(slackConfig); } await this.cacheService.reset() - await this.forestAdminService.triggerAirtableSync(); + //await this.forestAdminService.triggerAirtableSync(); return { code: 1, message: 'Success' }; } diff --git a/apps/web-api/src/utils/forest-admin/reset-cache-after-cud.ts b/apps/web-api/src/utils/forest-admin/reset-cache-after-cud.ts index 859252da8..21573630c 100644 --- a/apps/web-api/src/utils/forest-admin/reset-cache-after-cud.ts +++ b/apps/web-api/src/utils/forest-admin/reset-cache-after-cud.ts @@ -35,7 +35,7 @@ export async function resetCacheAfterCreateOrUpdateOrDelete( } : null, }); - +/** // Clear cache after create or update for (const currentCollection of collections) { currentCollection.addHook('After', 'Create', async () => { @@ -48,4 +48,5 @@ export async function resetCacheAfterCreateOrUpdateOrDelete( await redisCache.reset(); }); } + */ }