mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
chore: ruff
This commit is contained in:
parent
4420392241
commit
e22c4987bf
@ -357,7 +357,7 @@ class EventServiceBase:
|
|||||||
bytes: int,
|
bytes: int,
|
||||||
total_bytes: int,
|
total_bytes: int,
|
||||||
parts: List[Dict[str, Union[str, int]]],
|
parts: List[Dict[str, Union[str, int]]],
|
||||||
id: int
|
id: int,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
Emit at intervals while the install job is in progress (remote models only).
|
Emit at intervals while the install job is in progress (remote models only).
|
||||||
@ -377,7 +377,7 @@ class EventServiceBase:
|
|||||||
"bytes": bytes,
|
"bytes": bytes,
|
||||||
"total_bytes": total_bytes,
|
"total_bytes": total_bytes,
|
||||||
"parts": parts,
|
"parts": parts,
|
||||||
"id": id
|
"id": id,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -402,12 +402,7 @@ class EventServiceBase:
|
|||||||
"""
|
"""
|
||||||
self.__emit_model_event(
|
self.__emit_model_event(
|
||||||
event_name="model_install_completed",
|
event_name="model_install_completed",
|
||||||
payload={
|
payload={"source": source, "total_bytes": total_bytes, "key": key, "id": id},
|
||||||
"source": source,
|
|
||||||
"total_bytes": total_bytes,
|
|
||||||
"key": key,
|
|
||||||
"id": id
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def emit_model_install_cancelled(self, source: str) -> None:
|
def emit_model_install_cancelled(self, source: str) -> None:
|
||||||
@ -421,13 +416,7 @@ class EventServiceBase:
|
|||||||
payload={"source": source},
|
payload={"source": source},
|
||||||
)
|
)
|
||||||
|
|
||||||
def emit_model_install_error(
|
def emit_model_install_error(self, source: str, error_type: str, error: str, id: int) -> None:
|
||||||
self,
|
|
||||||
source: str,
|
|
||||||
error_type: str,
|
|
||||||
error: str,
|
|
||||||
id: int
|
|
||||||
) -> None:
|
|
||||||
"""
|
"""
|
||||||
Emit when an install job encounters an exception.
|
Emit when an install job encounters an exception.
|
||||||
|
|
||||||
@ -437,12 +426,7 @@ class EventServiceBase:
|
|||||||
"""
|
"""
|
||||||
self.__emit_model_event(
|
self.__emit_model_event(
|
||||||
event_name="model_install_error",
|
event_name="model_install_error",
|
||||||
payload={
|
payload={"source": source, "error_type": error_type, "error": error, "id": id},
|
||||||
"source": source,
|
|
||||||
"error_type": error_type,
|
|
||||||
"error": error,
|
|
||||||
"id": id
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def emit_bulk_download_started(
|
def emit_bulk_download_started(
|
||||||
|
@ -822,7 +822,7 @@ class ModelInstallService(ModelInstallServiceBase):
|
|||||||
parts=parts,
|
parts=parts,
|
||||||
bytes=job.bytes,
|
bytes=job.bytes,
|
||||||
total_bytes=job.total_bytes,
|
total_bytes=job.total_bytes,
|
||||||
id=job.id
|
id=job.id,
|
||||||
)
|
)
|
||||||
|
|
||||||
def _signal_job_completed(self, job: ModelInstallJob) -> None:
|
def _signal_job_completed(self, job: ModelInstallJob) -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user