diff --git a/server/src/configs/custom-environment-variables.json b/server/src/configs/custom-environment-variables.json index 7bdefc18b..683787cc2 100644 --- a/server/src/configs/custom-environment-variables.json +++ b/server/src/configs/custom-environment-variables.json @@ -261,10 +261,6 @@ "__name": "API_SEARCH_SOFT_KM_LIMIT", "__format": "number" }, - "searchHardKmLimit": { - "__name": "API_SEARCH_HARD_KM_LIMIT", - "__format": "number" - }, "nestHemisphere": "API_NEST_HEMISPHERE", "gymValidDataLimit": { "__name": "API_GYM_VALID_DATA_LIMIT", diff --git a/server/src/configs/default.json b/server/src/configs/default.json index 881d5d1cd..52a2e6b57 100644 --- a/server/src/configs/default.json +++ b/server/src/configs/default.json @@ -100,7 +100,6 @@ "weatherCellLimit": 3, "searchResultsLimit": 15, "searchSoftKmLimit": 10, - "searchHardKmLimit": 100, "nestHemisphere": "north", "gymValidDataLimit": 30, "hideOldGyms": false, diff --git a/server/src/services/DbCheck.js b/server/src/services/DbCheck.js index 8ef2d777b..c825f36ab 100644 --- a/server/src/services/DbCheck.js +++ b/server/src/services/DbCheck.js @@ -9,7 +9,6 @@ const { getBboxFromCenter } = require('./functions/getBbox') const { getCache } = require('./cache') const softLimit = config.getSafe('api.searchSoftKmLimit') -const hardLimit = config.getSafe('api.searchHardKmLimit') /** * @type {import("@rm/types").DbCheckClass} @@ -441,7 +440,6 @@ module.exports = class DbCheck { let deDuped = [] let count = 0 let distance = softLimit - const max = model === 'Pokemon' ? hardLimit / 2 : hardLimit const startTime = Date.now() while (deDuped.length < this.searchLimit) { const loopTime = Date.now() @@ -475,7 +473,6 @@ module.exports = class DbCheck { ) if ( deDuped.length >= this.searchLimit * 0.5 || - distance >= max || Date.now() - startTime > 2_000 ) { break @@ -487,7 +484,6 @@ module.exports = class DbCheck { } else { distance += softLimit } - distance = Math.min(distance, max) } if (count > 1) { log.info(