Skip to content

Commit

Permalink
fix(db): allow DB_RESULT_LIMIT to be set as an integer
Browse files Browse the repository at this point in the history
Previously, `DB_RESULT_LIMIT` was treated as a string, preventing it from being set dynamically. This update ensures it is parsed as an integer, fixing the issue. Updated logic: `result_limit = int(config.get("DB_RESULT_LIMIT", 250000))`.
  • Loading branch information
TeachMeTW committed Dec 9, 2024
1 parent 3900d3c commit 0254ee1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion emission/core/get_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
db_config[key] = None
print("Retrieved config: %s" % db_config)
url = config.get("DB_HOST", "localhost")
result_limit = config.get("DB_RESULT_LIMIT", 250000)
result_limit = int(config.get("DB_RESULT_LIMIT", 250000))

try:
parsed=pymongo.uri_parser.parse_uri(url)
Expand Down

0 comments on commit 0254ee1

Please sign in to comment.