Skip to content

Commit

Permalink
Merge pull request #16850 from mvdbeek/limit_watch_events
Browse files Browse the repository at this point in the history
[23.1] Exclude on_opened and on_closed from watcher events
  • Loading branch information
mvdbeek authored Oct 13, 2023
2 parents 4a397b1 + e9bc593 commit 6659840
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/galaxy/util/watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,17 @@ class EventHandler(FileSystemEventHandler):
def __init__(self, watcher):
self.watcher = watcher

def on_any_event(self, event):
# this effectively excludes on_opened and on_closed
def on_moved(self, event):
self._handle(event)

def on_created(self, event):
self._handle(event)

def on_deleted(self, event):
self._handle(event)

def on_modified(self, event):
self._handle(event)

def _extension_check(self, key, path):
Expand Down

0 comments on commit 6659840

Please sign in to comment.