фикс пинга
This commit is contained in:
parent
3de961b901
commit
2643c84aa6
1 changed files with 4 additions and 1 deletions
|
|
@ -1,5 +1,8 @@
|
|||
import asyncio
|
||||
import time
|
||||
from typing import Optional
|
||||
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.models.device import Device
|
||||
from app.models.object import Object
|
||||
|
|
@ -12,7 +15,7 @@ class PingAction(BaseAction):
|
|||
compatible_categories = [] # works for all device types
|
||||
params_schema = []
|
||||
|
||||
async def execute(self, device: Device, obj: Object, params: dict, emit: Emitter) -> ActionResult:
|
||||
async def execute(self, device: Device, obj: Object, params: dict, emit: Emitter, db: Optional[AsyncSession] = None) -> ActionResult:
|
||||
await emit(f"Pinging {device.ip}...", "info")
|
||||
start = time.monotonic()
|
||||
proc = None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue