mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-09 20:31:10 +00:00
clean up a bit
This commit is contained in:
parent
cd42974c1d
commit
ce363c60ca
1 changed files with 2 additions and 6 deletions
|
|
@ -1,15 +1,13 @@
|
||||||
import logging
|
import logging
|
||||||
from socket import gethostname
|
|
||||||
|
|
||||||
from telethon import TelegramClient
|
from telethon import TelegramClient
|
||||||
from telethon.sessions import MemorySession
|
from telethon.sessions import MemorySession
|
||||||
from uplink import AiohttpClient
|
from uplink import AiohttpClient
|
||||||
|
|
||||||
from ..checks.utils import format_for_healthchecks_slug
|
|
||||||
from ..core import cvars
|
from ..core import cvars
|
||||||
from .alert import Alert
|
from .alert import Alert
|
||||||
from .clients.healthchecks import HealthchecksClient
|
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:
|
async def get_tg_client() -> TelegramClient:
|
||||||
|
|
@ -23,9 +21,7 @@ async def get_tg_client() -> TelegramClient:
|
||||||
def get_healthchecks_client() -> HealthchecksClient:
|
def get_healthchecks_client() -> HealthchecksClient:
|
||||||
config = cvars.config.get()
|
config = cvars.config.get()
|
||||||
base_url = config.alert_channels.healthchecks.pinging_api_endpoint
|
base_url = config.alert_channels.healthchecks.pinging_api_endpoint
|
||||||
client = HealthchecksClient(
|
client = HealthchecksClient(base_url=base_url, client=AiohttpClient())
|
||||||
base_url=config.alert_channels.healthchecks.pinging_api_endpoint, client=AiohttpClient()
|
|
||||||
)
|
|
||||||
return client
|
return client
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue