fixed formatting issues
This commit is contained in:
@@ -8,7 +8,9 @@ from fastapi.staticfiles import StaticFiles
|
||||
from tools.web_monitor.dashboard import router as dashboard_router
|
||||
from tools.web_monitor.miner import router as miner_router
|
||||
from tools.web_monitor.scan import router as scan_router
|
||||
from tools.web_monitor._settings import router as settings_router
|
||||
from tools.web_monitor._settings import ( # noqa - Ignore access to _module
|
||||
router as settings_router,
|
||||
)
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import asyncio
|
||||
|
||||
from miners.miner_factory import MinerFactory
|
||||
from tools.web_monitor._settings.func import get_current_settings
|
||||
from tools.web_monitor._settings.func import ( # noqa - Ignore access to _module
|
||||
get_current_settings,
|
||||
)
|
||||
|
||||
|
||||
async def get_miner_data_dashboard(miner_ip):
|
||||
|
||||
@@ -5,7 +5,9 @@ import websockets.exceptions
|
||||
from fastapi import WebSocket, WebSocketDisconnect, APIRouter
|
||||
|
||||
from tools.web_monitor.func import get_current_miner_list
|
||||
from tools.web_monitor._settings.func import get_current_settings
|
||||
from tools.web_monitor._settings.func import ( # noqa - Ignore access to _module
|
||||
get_current_settings,
|
||||
)
|
||||
from tools.web_monitor.dashboard.func import get_miner_data_dashboard
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,9 @@ import websockets.exceptions
|
||||
from fastapi import WebSocket, WebSocketDisconnect, APIRouter
|
||||
|
||||
from miners.miner_factory import MinerFactory
|
||||
from tools.web_monitor._settings.func import get_current_settings
|
||||
from tools.web_monitor._settings.func import ( # noqa - Ignore access to _module
|
||||
get_current_settings,
|
||||
)
|
||||
|
||||
|
||||
router = APIRouter()
|
||||
@@ -24,9 +26,7 @@ async def miner_websocket(websocket: WebSocket, miner_ip):
|
||||
cur_miner = await asyncio.wait_for(
|
||||
MinerFactory().get_miner(str(miner_ip)), miner_identify_timeout
|
||||
)
|
||||
data = await asyncio.wait_for(
|
||||
cur_miner.get_data(), miner_identify_timeout
|
||||
)
|
||||
data = await asyncio.wait_for(cur_miner.get_data(), miner_data_timeout)
|
||||
|
||||
fan_speeds = [
|
||||
fan if not fan == -1 else 0
|
||||
|
||||
Reference in New Issue
Block a user