Refactor file monitoring and model scanning; remove unused monitors and streamline model file deletion process.

This commit is contained in:
Will Miao
2025-06-11 17:02:10 +08:00
parent 06d5bd259c
commit e81e96f0ab
5 changed files with 4 additions and 616 deletions

View File

@@ -131,19 +131,6 @@ class LoraManager:
# Initialize CivitaiClient first to ensure it's ready for other services
civitai_client = await ServiceRegistry.get_civitai_client()
# Get file monitors through ServiceRegistry
lora_monitor = await ServiceRegistry.get_lora_monitor()
checkpoint_monitor = await ServiceRegistry.get_checkpoint_monitor()
# Start monitors
lora_monitor.start()
logger.debug("Lora monitor started")
# Make sure checkpoint monitor has paths before starting
await checkpoint_monitor.initialize_paths()
checkpoint_monitor.start()
logger.debug("Checkpoint monitor started")
# Register DownloadManager with ServiceRegistry
download_manager = await ServiceRegistry.get_download_manager()