file_manager: delay file observer initialization
The addition of "gcode file processors" makes it possible for processor registration to occur in "component_init". The file observer init must be delayed until after all processors are registered to correctly process metadata for gcode files added while Moonraker was not running. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
@@ -176,7 +176,7 @@ class FileManager:
|
||||
if prune:
|
||||
self.gcode_metadata.prune_storage()
|
||||
|
||||
async def component_init(self):
|
||||
def start_file_observer(self):
|
||||
self.fs_observer.initialize()
|
||||
|
||||
def _update_fixed_paths(self) -> None:
|
||||
@@ -1889,6 +1889,8 @@ class InotifyObserver(BaseFileSystemObserver):
|
||||
self._notify_root_updated, mevts, root, root_path)
|
||||
|
||||
def initialize(self) -> None:
|
||||
if self.initialized:
|
||||
return
|
||||
for root, node in self.watched_roots.items():
|
||||
try:
|
||||
evts = node.scan_node()
|
||||
|
Reference in New Issue
Block a user