From a61dbdfaa93fbe5f609ed3837dfee7ea3ef7b0b2 Mon Sep 17 00:00:00 2001 From: tpv Date: Thu, 2 Jul 2026 12:49:41 -0700 Subject: [PATCH] added support for passing proxy path location depending on which env used --- src/monitor_utils/runner.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/monitor_utils/runner.py b/src/monitor_utils/runner.py index 756f095..4beedf2 100644 --- a/src/monitor_utils/runner.py +++ b/src/monitor_utils/runner.py @@ -37,9 +37,11 @@ LOGGER = logging.getLogger(__name__) def init_monitor( monitor_name: str, development_mode: DevelopmentMode, - proxy_path: str, + production_proxy_path: str = "proxies.txt", + testing_proxy_path: str = "configs/proxies.txt", logging_level=LOGGING_LEVEL, ) -> tuple[list[str], AsyncIOMotorCollection, AioProxies]: + use_production = is_production(development_mode) setup_logging( name="logs/latest.log", history_name=monitor_name, @@ -50,6 +52,7 @@ def init_monitor( category_names, _, collection = setup_config( monitor_name=monitor_name, development_mode=development_mode ) + proxy_path = production_proxy_path if use_production else testing_proxy_path proxies = AioProxies.from_file(path=proxy_path) return category_names, collection, proxies