mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
feat(cache): add cache health monitoring and validation system, see #730
- Add cache entry validator service for data integrity checks - Add cache health monitor service for periodic health checks - Enhance model cache and scanner with validation support - Update websocket manager for health status broadcasting - Add initialization banner service for cache health alerts - Add comprehensive test coverage for new services - Update translations across all locales - Refactor sync translation keys script
This commit is contained in:
@@ -198,6 +198,12 @@ class InitializationManager {
|
||||
handleProgressUpdate(data) {
|
||||
if (!data) return;
|
||||
console.log('Received progress update:', data);
|
||||
|
||||
// Handle cache health warning messages
|
||||
if (data.type === 'cache_health_warning') {
|
||||
this.handleCacheHealthWarning(data);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if this update is for our page type
|
||||
if (data.pageType && data.pageType !== this.pageType) {
|
||||
@@ -466,6 +472,29 @@ class InitializationManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle cache health warning messages from WebSocket
|
||||
*/
|
||||
handleCacheHealthWarning(data) {
|
||||
console.log('Cache health warning received:', data);
|
||||
|
||||
// Import bannerService dynamically to avoid circular dependencies
|
||||
import('../managers/BannerService.js').then(({ bannerService }) => {
|
||||
// Initialize banner service if not already done
|
||||
if (!bannerService.initialized) {
|
||||
bannerService.initialize().then(() => {
|
||||
bannerService.registerCacheHealthBanner(data);
|
||||
}).catch(err => {
|
||||
console.error('Failed to initialize banner service:', err);
|
||||
});
|
||||
} else {
|
||||
bannerService.registerCacheHealthBanner(data);
|
||||
}
|
||||
}).catch(err => {
|
||||
console.error('Failed to load banner service:', err);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up resources when the component is destroyed
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user