From 4050d2cebd7d55cdc3ba9f6545092b210804fe30 Mon Sep 17 00:00:00 2001 From: Andrew Rodgers Date: Mon, 22 Apr 2024 16:04:58 -0400 Subject: [PATCH] Fixes process overload from file events --- volttron/utils/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/volttron/utils/__init__.py b/volttron/utils/__init__.py index e4d1a23299..ec8e1d1d68 100644 --- a/volttron/utils/__init__.py +++ b/volttron/utils/__init__.py @@ -122,7 +122,7 @@ def __init__(self, filetowatch, callback): _log.debug("patterns is {}".format([get_home() + '/' + filetowatch])) self._callback = callback - def on_any_event(self, event): + def on_closed(self, event): _log.debug("Calling callback on event {}. Calling {}".format(event, self._callback)) try: self._callback() @@ -147,7 +147,7 @@ def __init__(self, filetowatch, callback): def watchfile(self): return self._filetowatch - def on_any_event(self, event): + def on_closed(self, event): _log.debug("Calling callback on event {}. Calling {}".format(event, self._callback)) try: self._callback(self._filetowatch)