--FIXED WEB SOCKET ISSUE
This commit is contained in:
george committed 2026-09-23 10:16:08 +05:30
1 parent 1c7e7cc886
commit e34b3c7445
2 files changed
+34 -4

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
# Virtual environment
venv/
.venv/
# Python cache
__pycache__/
*.py[cod]
# Environment variables / secrets
.env
.env.*
# IDE / editor files
.vscode/
.idea/
# OS files
.DS_Store
# Logs
*.log
# Python tooling caches
.pytest_cache/
.mypy_cache/
# Build / packaging
build/
dist/
*.egg-info/
+4 -4
View File
@@ -1,6 +1,6 @@
import psutil
from fastapi import FastAPI
import asyncio
from fastapi import FastAPI, WebSocket, WebSocketDisconnect
app = FastAPI()
@@ -56,7 +56,7 @@ async def hardware_status_monitor(websocket: WebSocket):
result = await asyncio.wait_for(
asyncio.to_thread(
get_hardware_status
hardware_status
),
timeout=3
)
@@ -92,4 +92,4 @@ if __name__ == "__main__":
app,
host="0.0.0.0",
port=9100
)
)