From 26e34446ece45a440b6c8da5ff31628ac435c7e5 Mon Sep 17 00:00:00 2001 From: Lan Xia Date: Thu, 7 Nov 2024 18:08:17 -0500 Subject: [PATCH] Set the minimum number of monitored builds to 10 Signed-off-by: Lan Xia --- TestResultSummaryService/BuildMonitor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TestResultSummaryService/BuildMonitor.js b/TestResultSummaryService/BuildMonitor.js index 8e6deeaf..0b4c3de6 100644 --- a/TestResultSummaryService/BuildMonitor.js +++ b/TestResultSummaryService/BuildMonitor.js @@ -37,14 +37,14 @@ class BuildMonitor { // descending order allBuilds.sort((a, b) => parseInt(b.id) - parseInt(a.id)); /* - * Loop through allBuilds or past 5 builds (whichever is + * Loop through allBuilds or past 10 builds (whichever is * less) to avoid OOM error. If there is not a match in db, * create the new build. Otherwise, break. Since allBuilds * are in descending order, we assume if we find a match, * all remaining builds that has a lower build number is in * db. */ - const limit = Math.min(5, allBuilds.length); + const limit = Math.min(10, allBuilds.length); const testResults = new TestResultsDB(); for (let i = 0; i < limit; i++) { const buildNum = parseInt(allBuilds[i].id, 10);