Skip to content

Commit

Permalink
feat: disable forestadmin for prod app crash
Browse files Browse the repository at this point in the history
  • Loading branch information
madan-ideas2it committed Oct 31, 2024
1 parent 5e60206 commit 18cfb93
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/web-api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' };
}

Expand Down Expand Up @@ -571,7 +571,7 @@ export class ParticipantsRequestService {
}
);
}
await this.forestAdminService.triggerAirtableSync();
//await this.forestAdminService.triggerAirtableSync();
return { code: 1, message: 'Success' };
}

Expand Down Expand Up @@ -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' };
}

Expand Down Expand Up @@ -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' };
}

Expand Down
3 changes: 2 additions & 1 deletion apps/web-api/src/utils/forest-admin/reset-cache-after-cud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand All @@ -48,4 +48,5 @@ export async function resetCacheAfterCreateOrUpdateOrDelete(
await redisCache.reset();
});
}
*/
}

0 comments on commit 18cfb93

Please sign in to comment.