mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
feat: implement task cancellation for model scanning and bulk operations
This commit is contained in:
@@ -168,6 +168,17 @@ class MockScanner:
|
||||
self.updated_models: List[Dict[str, Any]] = []
|
||||
self.preview_updates: List[Dict[str, Any]] = []
|
||||
self.bulk_deleted: List[Sequence[str]] = []
|
||||
self._cancelled = False
|
||||
self.model_type = "test-model"
|
||||
|
||||
def is_cancelled(self) -> bool:
|
||||
return self._cancelled
|
||||
|
||||
def cancel_task(self) -> None:
|
||||
self._cancelled = True
|
||||
|
||||
def reset_cancellation(self) -> None:
|
||||
self._cancelled = False
|
||||
|
||||
async def get_cached_data(self, force_refresh: bool = False):
|
||||
return self._cache
|
||||
|
||||
Reference in New Issue
Block a user