diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-02 15:36:45 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-02 15:36:45 +0900 |
| commit | e5fc21f3c9c890c254c5f74412aa0b68c3863042 (patch) | |
| tree | 475f6ce445b9927c7c448ed3c3673c3d351e49ea /services/news-collector/src/news_collector | |
| parent | be7dc5311328d5d4bcb16cd613bcc88c26eaffa2 (diff) | |
feat: add config validation, SecretStr for secrets, API security fields
Diffstat (limited to 'services/news-collector/src/news_collector')
| -rw-r--r-- | services/news-collector/src/news_collector/main.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/services/news-collector/src/news_collector/main.py b/services/news-collector/src/news_collector/main.py index 3493f7c..f56914f 100644 --- a/services/news-collector/src/news_collector/main.py +++ b/services/news-collector/src/news_collector/main.py @@ -115,14 +115,14 @@ async def run() -> None: metrics = ServiceMetrics("news_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()) health = HealthCheckServer( "news-collector", @@ -133,7 +133,7 @@ async def run() -> None: metrics.service_up.labels(service="news-collector").set(1) # Build collectors - finnhub = FinnhubCollector(api_key=config.finnhub_api_key) + finnhub = FinnhubCollector(api_key=config.finnhub_api_key.get_secret_value()) rss = RSSCollector() sec = SecEdgarCollector() truth = TruthSocialCollector() |
