Skip to content

Commit

Permalink
Fixes process overload from file events
Browse files Browse the repository at this point in the history
  • Loading branch information
acedrew authored and craig8 committed Apr 24, 2024
1 parent 5f60f11 commit 5e77b59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions volttron/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,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()
Expand All @@ -133,7 +133,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)
Expand Down

0 comments on commit 5e77b59

Please sign in to comment.