testing price tracking/composite key changes

This commit is contained in:
tpv committed 2026-07-06 09:46:07 -07:00
1 parent 0be6fa5d13
commit 136a67c16f
3 files changed
+88 -11

No files matched your search

+4
View File
@@ -17,11 +17,13 @@ class DevelopmentMode(str, Enum):
def is_production(development_mode: DevelopmentMode) -> bool:
"""Return True when the mode is PRODUCTION."""
return development_mode == DevelopmentMode.PRODUCTION
def get_bot_token(is_production: bool) -> str:
"""Return the production or development bot token for the mode."""
if is_production:
return PRODUCTION_BOT_TOKEN
@@ -45,6 +47,7 @@ def get_config(
Returns:
Tuple of the parsed config dict and the resolved config path.
"""
monitor_name = monitor_name.replace(".json", "")
base = config_dir if use_production_path else test_config_dir
config_path = pathlib.Path(base) / f"{monitor_name}.json"
@@ -54,5 +57,6 @@ def get_config(
def set_logger_levels(loggers: list[str] = LOGGERS, level: int = logging.WARNING):
"""Set the given loggers to the given level to quiet noisy libraries."""
for name in loggers:
logging.getLogger(name).setLevel(level)