mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
no more busyloops in stub plugins
This commit is contained in:
@@ -20,11 +20,11 @@
|
||||
# ========================================================================== #
|
||||
|
||||
|
||||
import asyncio
|
||||
|
||||
from typing import Dict
|
||||
from typing import AsyncGenerator
|
||||
|
||||
from ... import aiotools
|
||||
|
||||
from . import AtxOperationError
|
||||
from . import BaseAtx
|
||||
|
||||
@@ -50,7 +50,7 @@ class Plugin(BaseAtx):
|
||||
async def poll_state(self) -> AsyncGenerator[Dict, None]:
|
||||
while True:
|
||||
yield self.get_state()
|
||||
await asyncio.sleep(60)
|
||||
await aiotools.wait_infinite()
|
||||
|
||||
# =====
|
||||
|
||||
|
||||
Reference in New Issue
Block a user