feat(plugin): add force install option and backup/restore on failure

This commit is contained in:
InfinityPacer
2024-10-17 11:24:27 +08:00
parent 346c6dd11c
commit e233bc678c
2 changed files with 62 additions and 8 deletions

View File

@@ -280,7 +280,7 @@ class PluginManager(metaclass=Singleton):
def install_plugin(plugin):
start_time = time.time()
state, msg = self.pluginhelper.install(pid=plugin.id, repo_url=plugin.repo_url)
state, msg = self.pluginhelper.install(pid=plugin.id, repo_url=plugin.repo_url, force_install=True)
elapsed_time = time.time() - start_time
if state:
logger.info(