def _handle_event()

in collection_manager/collection_manager/services/CollectionWatcher.py [0:0]


    def _handle_event(self, event):
        path = event.src_path
        for collection in self._collections_for_dir:
            try:
                if collection.owns_file(path):
                    if isinstance(event, S3Event):
                        modified_time = int(event.modified_time.timestamp())
                    else:
                        modified_time = int(os.path.getmtime(path))
                    self._loop.create_task(self._callback(path, modified_time, collection))
            except IsADirectoryError:
                return