summaryrefslogtreecommitdiff
path: root/kvmd/plugins
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2024-10-28 17:20:13 +0200
committerMaxim Devaev <[email protected]>2024-10-28 17:20:13 +0200
commit2195acf2ff8fdd9857db8a8b317b5fb98f4bacb7 (patch)
treedfd190a78c99f2074b95117c0ef2f01e180ea327 /kvmd/plugins
parent60f413c1f4c5d2d69df03a2eea01eccf63c76976 (diff)
Don't watch inotify modify events because they fires on every write()
Diffstat (limited to 'kvmd/plugins')
-rw-r--r--kvmd/plugins/msd/otg/__init__.py4
-rw-r--r--kvmd/plugins/ugpio/otgconf.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/plugins/msd/otg/__init__.py b/kvmd/plugins/msd/otg/__init__.py
index 99de95e0..93eacbc7 100644
--- a/kvmd/plugins/msd/otg/__init__.py
+++ b/kvmd/plugins/msd/otg/__init__.py
@@ -439,8 +439,8 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
await asyncio.sleep(5)
with Inotify() as inotify:
- await inotify.watch_all_modify(*self.__storage.get_watchable_paths())
- await inotify.watch_all_modify(*self.__drive.get_watchable_paths())
+ await inotify.watch_all_changes(*self.__storage.get_watchable_paths())
+ await inotify.watch_all_changes(*self.__drive.get_watchable_paths())
# После установки вотчеров еще раз проверяем стейт,
# чтобы не потерять состояние привода.
diff --git a/kvmd/plugins/ugpio/otgconf.py b/kvmd/plugins/ugpio/otgconf.py
index dc255b02..4c85b0e8 100644
--- a/kvmd/plugins/ugpio/otgconf.py
+++ b/kvmd/plugins/ugpio/otgconf.py
@@ -81,8 +81,8 @@ class Plugin(BaseUserGpioDriver):
await asyncio.sleep(5)
with Inotify() as inotify:
- await inotify.watch_all_modify(os.path.dirname(self.__udc_path))
- await inotify.watch_all_modify(self.__profile_path)
+ await inotify.watch_all_changes(os.path.dirname(self.__udc_path))
+ await inotify.watch_all_changes(self.__profile_path)
self._notifier.notify()
while True:
need_restart = False