diff --git a/src/lego_monitoring/alerting/sender.py b/src/lego_monitoring/alerting/sender.py index 8601172..11741ef 100644 --- a/src/lego_monitoring/alerting/sender.py +++ b/src/lego_monitoring/alerting/sender.py @@ -1,15 +1,13 @@ import logging -from socket import gethostname from telethon import TelegramClient from telethon.sessions import MemorySession from uplink import AiohttpClient -from ..checks.utils import format_for_healthchecks_slug from ..core import cvars from .alert import Alert from .clients.healthchecks import HealthchecksClient -from .enum import SEVERITY_TO_EMOJI, AlertType, Severity +from .enum import SEVERITY_TO_EMOJI, Severity async def get_tg_client() -> TelegramClient: @@ -23,9 +21,7 @@ async def get_tg_client() -> TelegramClient: def get_healthchecks_client() -> HealthchecksClient: config = cvars.config.get() base_url = config.alert_channels.healthchecks.pinging_api_endpoint - client = HealthchecksClient( - base_url=config.alert_channels.healthchecks.pinging_api_endpoint, client=AiohttpClient() - ) + client = HealthchecksClient(base_url=base_url, client=AiohttpClient()) return client