mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 08:48:13 +00:00
Fix issue with jobs occasionally showing for the wrong server
This commit is contained in:
@@ -29,10 +29,6 @@ def make_sortable(tree):
|
||||
tree.heading(col, text=col, command=lambda c=col: sort_column(tree, c))
|
||||
|
||||
|
||||
def available_servers():
|
||||
return [socket.gethostname()]
|
||||
|
||||
|
||||
class DashboardWindow:
|
||||
|
||||
lib_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
@@ -238,7 +234,10 @@ class DashboardWindow:
|
||||
tree.item(item, values=new_values, tags=tags)
|
||||
break
|
||||
|
||||
hostname = self.server_proxy.hostname
|
||||
job_fetch = self.server_proxy.get_jobs()
|
||||
# have to check hostname is still valid because of delay in fetching jobs
|
||||
if hostname == self.server_proxy.hostname:
|
||||
if job_fetch is not None:
|
||||
if len(job_fetch) < len(self.job_cache) or len(job_fetch) == 0:
|
||||
self.job_tree.delete(*self.job_tree.get_children())
|
||||
@@ -279,6 +278,10 @@ class DashboardWindow:
|
||||
|
||||
|
||||
def start_client():
|
||||
|
||||
logging.basicConfig(format='%(asctime)s: %(levelname)s: %(module)s: %(message)s', datefmt='%d-%b-%y %H:%M:%S',
|
||||
level='INFO'.upper())
|
||||
|
||||
x = DashboardWindow()
|
||||
x.mainloop()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user