| 26 | |
| 27 | |
| 28 | class ContainerFilesHandler(FileSystemEventHandler): |
| 29 | def __init__(self): |
| 30 | self.log_filename = None |
| 31 | self.EXCLUDES = None |
| 32 | self.module_name = None |
| 33 | |
| 34 | def on_any_event(self, event): |
| 35 | if not (event.event_type == 'modified' and event.is_directory) \ |
| 36 | and not is_excluded(event.src_path, self.EXCLUDES): |
| 37 | insert_to_file_change_events_collection( |
| 38 | FileEventsData( |
| 39 | file_path=byte_to_str(event.src_path), |
| 40 | status=byte_to_str(event.event_type), |
| 41 | module_name=self.module_name, |
| 42 | date=now(), |
| 43 | is_directory=event.is_directory |
| 44 | ) |
| 45 | ) |
| 46 | |
| 47 | |
| 48 | class FileMonitor: |