This commit is contained in:
nafer committed 2026-03-06 01:57:29 +03:00
1 parent 52974e29a6
commit dd2279c3f1
1 file changed
+15 -4
+15 -4
View File
@@ -27,10 +27,21 @@ async def lifespan(app: FastAPI):
import sys
from importlib import metadata
print(f"Python version: {sys.version}")
print("Installed packages:")
dists = metadata.distributions()
for dist in dists:
print(f" {dist.metadata['Name']}=={dist.version}")
# Автоматический запуск Chrome при старте, если включен Remote Debugging
if REMOTE_DEBUGGING_ENABLED:
print("Remote Debugging enabled, starting Chrome on startup...")
# Выведем IP адреса для отладки
import socket
try:
hostname = socket.gethostname()
ip_address = socket.gethostbyname(hostname)
print(f"Container IP: {ip_address}")
except:
pass
# Запускаем Chrome
asyncio.create_task(run_browser_task("startup", "about:blank", 1, None))
yield
# Shutdown logic (if needed)