From c11791a498dfaa2bef9187dadc53b46495fdc258 Mon Sep 17 00:00:00 2001 From: Mygod Date: Wed, 28 Feb 2024 22:24:31 -0500 Subject: [PATCH] fix: no more hard limits for pois - fixes #956 - i'm so nice --- server/src/services/DbManager.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/server/src/services/DbManager.js b/server/src/services/DbManager.js index ae3e3d407..3e46a9ee4 100644 --- a/server/src/services/DbManager.js +++ b/server/src/services/DbManager.js @@ -436,7 +436,21 @@ class DbManager extends Logger { let deDuped = [] let count = 0 let distance = softLimit - const max = model === 'Pokemon' ? hardLimit / 2 : hardLimit + let max = hardLimit + switch (model) { + case 'Pokemon': + max = hardLimit / 2 + break + case 'Gym': + case 'Nest': + case 'Pokestop': + case 'Portal': + case 'Route': + max = Infinity + break + default: + break + } const startTime = Date.now() while (deDuped.length < searchLimit) { const loopTime = Date.now()