From a594b574e8bb48faee80029dbfdf15927b7d7b98 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sat, 18 Mar 2023 01:20:27 +0200 Subject: msd tick every 3 seconds --- kvmd/plugins/msd/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kvmd/plugins') diff --git a/kvmd/plugins/msd/__init__.py b/kvmd/plugins/msd/__init__.py index 65da192c..8836a681 100644 --- a/kvmd/plugins/msd/__init__.py +++ b/kvmd/plugins/msd/__init__.py @@ -199,7 +199,7 @@ class MsdFileReader(BaseMsdReader): # pylint: disable=too-many-instance-attribu self.__readed += len(chunk) now = time.monotonic() - if self.__tick + 1 < now or self.__readed == self.__file_size: + if self.__tick + 3 < now or self.__readed == self.__file_size: self.__tick = now self.__notifier.notify() @@ -258,7 +258,7 @@ class MsdFileWriter(BaseMsdWriter): # pylint: disable=too-many-instance-attribu self.__unsynced = 0 now = time.monotonic() - if self.__tick + 1 < now: + if self.__tick + 3 < now: self.__tick = now self.__notifier.notify() -- cgit v1.2.3