mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(mm): handle any error during installation
Previously we only handled expected error types. If a different error was raised, the install job would end up in an unexpected state where it has failed and isn't doing anything, but its status is still running. This indirectly prevents the installer threads from exiting - they are waiting for all jobs to be completed, including the failed-but-still-running job. We need to handle any error here to prevent this.
This commit is contained in:
parent
3aad6f975b
commit
b2ea749c72
@ -457,11 +457,10 @@ class ModelInstallService(ModelInstallServiceBase):
|
||||
elif job.waiting or job.downloads_done:
|
||||
self._register_or_install(job)
|
||||
|
||||
except InvalidModelConfigException as excp:
|
||||
self._set_error(job, excp)
|
||||
|
||||
except (OSError, DuplicateModelException) as excp:
|
||||
self._set_error(job, excp)
|
||||
except Exception as e:
|
||||
# Expected errors include InvalidModelConfigException, DuplicateModelException, OSError, but we must
|
||||
# gracefully handle _any_ error here.
|
||||
self._set_error(job, e)
|
||||
|
||||
finally:
|
||||
# if this is an install of a remote file, then clean up the temporary directory
|
||||
|
Loading…
x
Reference in New Issue
Block a user