From 359b9926835968224e833b5e68d3eccf9f2afa8d Mon Sep 17 00:00:00 2001 From: Pranav Date: Thu, 20 Mar 2025 13:08:59 -0700 Subject: [PATCH] chore: Reduce meta conversation API calls (#11116) This PR would reduce the API calls if there are more than 100 total conversations, we will throttle requests the number of requests. Earlier this was 1000 total conversations. --- app/javascript/dashboard/store/modules/conversationStats.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/dashboard/store/modules/conversationStats.js b/app/javascript/dashboard/store/modules/conversationStats.js index 025e3352f..35fc1c6ab 100644 --- a/app/javascript/dashboard/store/modules/conversationStats.js +++ b/app/javascript/dashboard/store/modules/conversationStats.js @@ -18,7 +18,7 @@ export const actions = { const lastUpdatedTime = new Date($state.updatedOn); // Skip large accounts from making too many requests - if (currentTime - lastUpdatedTime < 10000 && $state.allCount > 1000) { + if (currentTime - lastUpdatedTime < 10000 && $state.allCount > 100) { // eslint-disable-next-line no-console console.warn('Skipping conversation meta fetch'); return;