From 2946974f7697d4e34a752bd04d8e7745ee85bb8e Mon Sep 17 00:00:00 2001 From: Kuan Wee Loong Date: Thu, 18 Apr 2024 19:34:22 +0800 Subject: [PATCH] chore: update comments --- .../m365-excel/common/interceptors/request-error-handler.ts | 2 -- packages/backend/src/apps/m365-excel/common/rate-limiter.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/backend/src/apps/m365-excel/common/interceptors/request-error-handler.ts b/packages/backend/src/apps/m365-excel/common/interceptors/request-error-handler.ts index 7bf898f3c..b7e51b550 100644 --- a/packages/backend/src/apps/m365-excel/common/interceptors/request-error-handler.ts +++ b/packages/backend/src/apps/m365-excel/common/interceptors/request-error-handler.ts @@ -18,8 +18,6 @@ const handle429: ThrowingHandler = ($, error) => { // https://learn.microsoft.com/en-us/graph/workbook-best-practice?tabs=http#reduce-throttling-errors // // Excel endpoints are uniquely identified by the `/workbook/` url segment. - // It's safe to directly check for this substring in the URL because '/'s are - // escaped if they're from user input. // // FIXME (ogp-weeloong): eval if we can remove this and just retry _all_ 429s // once we get bullmq pro in. diff --git a/packages/backend/src/apps/m365-excel/common/rate-limiter.ts b/packages/backend/src/apps/m365-excel/common/rate-limiter.ts index be2b24a3b..1c69b9e01 100644 --- a/packages/backend/src/apps/m365-excel/common/rate-limiter.ts +++ b/packages/backend/src/apps/m365-excel/common/rate-limiter.ts @@ -101,7 +101,7 @@ export async function throttleStepsForPublishedPipes( error: 'Reached M365 step limit', // If we're rate limited, we're probably facing a spike of steps for that // file, so spread out retries over a wider time period (2x) to reduce the - // size of the retry thundering herd. + // size of the retry thundering herd at any point in time. delayInMs: P90_EXCEL_API_RTT_SECONDS * 1000 * 2, }) }