mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-15 18:50:29 +08:00
supressed snapshot spam
This commit is contained in:
parent
f3a9ae75f9
commit
a81871adbe
@ -92,7 +92,8 @@ class Snapshoter: # pylint: disable=too-many-instance-attributes
|
|||||||
|
|
||||||
async def __take_snapshot(self, live: bool, notifier: aiotools.AioNotifier) -> None:
|
async def __take_snapshot(self, live: bool, notifier: aiotools.AioNotifier) -> None:
|
||||||
logger = get_logger(0)
|
logger = get_logger(0)
|
||||||
logger.info("Time to take the new snapshot (%s)", ("live" if live else "idle"))
|
if not live:
|
||||||
|
logger.info("Time to take the new idle snapshot")
|
||||||
try:
|
try:
|
||||||
self.__snapshoting = True
|
self.__snapshoting = True
|
||||||
await notifier.notify()
|
await notifier.notify()
|
||||||
@ -117,7 +118,8 @@ class Snapshoter: # pylint: disable=too-many-instance-attributes
|
|||||||
while retries:
|
while retries:
|
||||||
snapshot = await self.__streamer.take_snapshot(save=True, load=False, allow_offline=False)
|
snapshot = await self.__streamer.take_snapshot(save=True, load=False, allow_offline=False)
|
||||||
if snapshot:
|
if snapshot:
|
||||||
logger.info("New snapshot saved: %dx%d", snapshot.width, snapshot.height)
|
if not live:
|
||||||
|
logger.info("New idle snapshot saved: %dx%d", snapshot.width, snapshot.height)
|
||||||
break
|
break
|
||||||
retries -= 1
|
retries -= 1
|
||||||
await asyncio.sleep(self.__retries_delay)
|
await asyncio.sleep(self.__retries_delay)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user