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 committed Apr 22, 2024
1 parent 21a15ae commit 4050d2c
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 @@ -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()
Expand All @@ -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)
Expand Down

0 comments on commit 4050d2c

Please sign in to comment.