diff options
-rw-r--r-- | combox/events.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/combox/events.py b/combox/events.py index 973a79d..5cdd54f 100644 --- a/combox/events.py +++ b/combox/events.py @@ -240,6 +240,11 @@ class NodeDirMonitor(LoggingEventHandler): super(NodeDirMonitor, self).on_created(event) self.silo_update() + if not self.shardp(event.src_path) and not event.is_directory: + # the file created can be ignored as it is not a shard or + # a directory. + return + file_cb_path = cb_path(event.src_path, self.config) if event.is_directory and (not path.exists(file_cb_path)): @@ -262,6 +267,11 @@ class NodeDirMonitor(LoggingEventHandler): super(NodeDirMonitor, self).on_deleted(event) self.silo_update() + if not self.shardp(event.src_path) and not event.is_directory: + # the file created can be ignored as it is not a shard or + # a directory. + return + file_cb_path = cb_path(event.src_path, self.config) if event.is_directory: @@ -278,6 +288,11 @@ class NodeDirMonitor(LoggingEventHandler): super(NodeDirMonitor, self).on_modified(event) self.silo_update() + if not self.shardp(event.src_path) and not event.is_directory: + # the file created can be ignored as it is not a shard or + # a directory. + return + file_cb_path = cb_path(event.src_path, self.config) if event.is_directory: |