Log when a non-server-url is passed to check_server

This commit is contained in:
Nexus 2024-04-14 18:08:41 +01:00
parent 12f9a012f7
commit 7b72ced147
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -496,7 +496,9 @@ class Ollama(commands.Cog):
async def check_server(self, url: str) -> bool:
"""Checks that a server is online and responding."""
if url in SERVER_KEYS:
_u = url
url = CONFIG["ollama"][url]["base_url"]
self.log.warning("Resolved 'url' %s to %s", _u, url)
async with aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(10)) as session:
self.log.debug("Checking if %r is online.", url)
try: