mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
maybe solve race issue
This commit is contained in:
parent
e93f4d632d
commit
fce6b3e44c
@ -754,6 +754,8 @@ class ModelInstallService(ModelInstallServiceBase):
|
|||||||
self._download_cache[download_job.source] = install_job # matches a download job to an install job
|
self._download_cache[download_job.source] = install_job # matches a download job to an install job
|
||||||
install_job.download_parts.add(download_job)
|
install_job.download_parts.add(download_job)
|
||||||
|
|
||||||
|
# only start the jobs once install_job.download_parts is fully populated
|
||||||
|
for download_job in install_job.download_parts:
|
||||||
self._download_queue.submit_download_job(
|
self._download_queue.submit_download_job(
|
||||||
download_job,
|
download_job,
|
||||||
on_start=self._download_started_callback,
|
on_start=self._download_started_callback,
|
||||||
@ -762,6 +764,7 @@ class ModelInstallService(ModelInstallServiceBase):
|
|||||||
on_error=self._download_error_callback,
|
on_error=self._download_error_callback,
|
||||||
on_cancelled=self._download_cancelled_callback,
|
on_cancelled=self._download_cancelled_callback,
|
||||||
)
|
)
|
||||||
|
|
||||||
return install_job
|
return install_job
|
||||||
|
|
||||||
def _stat_size(self, path: Path) -> int:
|
def _stat_size(self, path: Path) -> int:
|
||||||
|
Loading…
Reference in New Issue
Block a user