Skip to content
This repository was archived by the owner on Apr 26, 2023. It is now read-only.

Commit b4c5879

Browse files
* The log component is refreshing automatically
1 parent 956ed91 commit b4c5879

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

pyworkflow/gui/plugin_manager.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,10 +667,24 @@ def _applyAllOperations(self, event=None):
667667
# Create two tabs where the log and errors will appears
668668
self.Textlog.createWidgets([self.file_log_path, self.file_errors_path])
669669
if event is not None:
670-
threadOp = threading.Thread(name="plugin-manager",
671-
target=self._applyOperations,
672-
args=(None,))
673-
threadOp.start()
670+
self.threadOp = threading.Thread(name="plugin-manager",
671+
target=self._applyOperations,
672+
args=(None,))
673+
self.threadOp.start()
674+
675+
self.threadRefresh = threading.Thread(name="refresh_log",
676+
target=self._refreshLogsComponent,
677+
args=(3,))
678+
self.threadRefresh.start()
679+
680+
def _refreshLogsComponent(self, wait=3):
681+
"""
682+
Refresh the Plugin Manager log
683+
"""
684+
import time
685+
while self.threadOp.isAlive():
686+
time.sleep(wait)
687+
self.Textlog.refreshAll(goEnd=True)
674688

675689
def _applyOperations(self, operation=None):
676690
"""

0 commit comments

Comments
 (0)