Skip to content

Commit

Permalink
fix: remove duplicated logs and double reinitialization
Browse files Browse the repository at this point in the history
  • Loading branch information
pommee committed Aug 13, 2024
1 parent 8d368a7 commit 704b651
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion application/docker_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def status(self, container: Container):
def live_container_logs(self, logs: RichLog, stop_event: Event):
logs.clear()
last_fetch = time.time()
logs.write(self.logs())

while not stop_event.is_set():
new_logs = self.selected_container.logs(since=last_fetch)
Expand Down
3 changes: 3 additions & 0 deletions application/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ def _update_tab_content(self, tab_id: str):
old_index = self.current_index
new_index = self.list_view.index

if old_index == new_index:
return

docker_manager.selected_container = self.list_view.children[new_index].id
self.set_list_item_background(old_index, new_index)
self.content_window.run_log_task()
Expand Down

0 comments on commit 704b651

Please sign in to comment.