Skip to content

Commit

Permalink
Merge pull request #2194 from matthewrmshin/fix-gscan-update-issues
Browse files Browse the repository at this point in the history
gscan: improve diag while updating
  • Loading branch information
hjoliver committed Mar 8, 2017
2 parents 35136a5 + f72cde3 commit 0c163c6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 6 additions & 2 deletions lib/cylc/gui/gscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def __init__(
raise ValueError("Invalid %s pattern: %s" % (label, items))

self.updater = ScanAppUpdater(
self.hosts, suite_treemodel, self.suite_treeview,
self.window, self.hosts, suite_treemodel, self.suite_treeview,
comms_timeout=comms_timeout, poll_interval=poll_interval,
group_column_id=self.GROUP_COLUMN,
name_pattern=patterns["name"], owner_pattern=patterns["owner"])
Expand Down Expand Up @@ -541,9 +541,10 @@ class ScanAppUpdater(threading.Thread):

POLL_INTERVAL = 60

def __init__(self, hosts, suite_treemodel, suite_treeview,
def __init__(self, window, hosts, suite_treemodel, suite_treeview,
comms_timeout=None, poll_interval=None, group_column_id=0,
name_pattern=None, owner_pattern=None):
self.window = window
self.hosts = hosts
self.comms_timeout = comms_timeout
if poll_interval is None:
Expand Down Expand Up @@ -665,10 +666,13 @@ def run(self):
continue
if self._should_force_update:
self._should_force_update = False
title = self.window.get_title()
gobject.idle_add(self.window.set_title, title + " (updating)")
self.suite_info_map = update_suites_info(
self.hosts, self.comms_timeout, self.owner_pattern,
self.name_pattern, self.suite_info_map)
self.last_update_time = time.time()
gobject.idle_add(self.window.set_title, title)
gobject.idle_add(self.update)
time.sleep(1)

Expand Down
7 changes: 6 additions & 1 deletion lib/cylc/network/https/port_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def _scan1_impl(conn, timeout, my_uuid):
result = client.identify()
except ConnectionTimeout as exc:
conn.send((host, port, MSG_TIMEOUT))
except ConnectionError as exc:
except (ConnectionError, SuiteStillInitialisingError) as exc:
conn.send((host, port, None))
else:
owner = result.get('owner')
Expand All @@ -84,6 +84,11 @@ def _scan1_impl(conn, timeout, my_uuid):
my_uuid=my_uuid, timeout=timeout)
try:
result = client.identify()
except SuiteStillInitialisingError as exc:
if cylc.flags.debug:
print >> sys.stderr, (
' (connected with passphrase,' +
' suite initialising)')
except ConnectionError as exc:
# Nope (private suite, wrong passphrase).
if cylc.flags.debug:
Expand Down

0 comments on commit 0c163c6

Please sign in to comment.