Skip to content

Commit

Permalink
fix: non-blocking exec for manual & retry install
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperDumbTM committed Aug 29, 2023
1 parent 9b15f87 commit 9ea99eb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/install/task_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def manual_install(self):
for task in (t for t in self.tasks if t.status == ExecuteStatus.PENDING):
self.qsig_msg.emit(f"開始安裝 {task.name} (手動模式)")
try:
task.execute(no_options=True)
Thread(target=task.execute, args=(True,), daemon=False).start()
except Exception as e:
self.qsig_msg.emit(f"{e} ({task.name})")

Expand All @@ -108,7 +108,10 @@ def retry_install(self, no_options: bool = True):
continue
self.qsig_msg.emit(f"開始重試 {task.name} (手動模式)")
try:
task.execute(no_options=no_options)
Thread(
target=task.execute,
args=(no_options,),
daemon=False).start()
except Exception as e:
self.qsig_msg.emit(f"{e} ({task.name})")

Expand Down

0 comments on commit 9ea99eb

Please sign in to comment.