summaryrefslogtreecommitdiff
path: root/services/data-collector
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-02 15:36:45 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-04-02 15:36:45 +0900
commite5fc21f3c9c890c254c5f74412aa0b68c3863042 (patch)
tree475f6ce445b9927c7c448ed3c3673c3d351e49ea /services/data-collector
parentbe7dc5311328d5d4bcb16cd613bcc88c26eaffa2 (diff)
feat: add config validation, SecretStr for secrets, API security fields
Diffstat (limited to 'services/data-collector')
-rw-r--r--services/data-collector/src/data_collector/main.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/services/data-collector/src/data_collector/main.py b/services/data-collector/src/data_collector/main.py
index b42b34c..608d6cd 100644
--- a/services/data-collector/src/data_collector/main.py
+++ b/services/data-collector/src/data_collector/main.py
@@ -56,18 +56,18 @@ async def run() -> None:
metrics = ServiceMetrics("data_collector")
notifier = TelegramNotifier(
- bot_token=config.telegram_bot_token,
+ bot_token=config.telegram_bot_token.get_secret_value(),
chat_id=config.telegram_chat_id,
)
- db = Database(config.database_url)
+ db = Database(config.database_url.get_secret_value())
await db.connect()
- broker = RedisBroker(config.redis_url)
+ broker = RedisBroker(config.redis_url.get_secret_value())
alpaca = AlpacaClient(
- api_key=config.alpaca_api_key,
- api_secret=config.alpaca_api_secret,
+ api_key=config.alpaca_api_key.get_secret_value(),
+ api_secret=config.alpaca_api_secret.get_secret_value(),
paper=config.alpaca_paper,
)