Skip to content

Commit

Permalink
Merge pull request #2271 from dvalters/fix-check-update-gui-cpu
Browse files Browse the repository at this point in the history
Reduce number of HTTP connections to address CPU usage
  • Loading branch information
hjoliver authored May 10, 2017
2 parents 6676b3f + 6d8ac97 commit afe5ba6
Show file tree
Hide file tree
Showing 4 changed files with 281 additions and 153 deletions.
17 changes: 8 additions & 9 deletions lib/cylc/gui/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,16 +302,15 @@ def retrieve_summary_update_time(self):

def retrieve_state_summaries(self):
"""Retrieve suite summary."""
ret = self.state_summary_client.get_suite_state_summary()
glbl, states, fam_states = (
self.state_summary_client.get_suite_state_summary())
self.ancestors = self.suite_info_client.get_info(
'get_first_parent_ancestors')
self.ancestors_pruned = self.suite_info_client.get_info(
'get_first_parent_ancestors', pruned=True)
self.descendants = self.suite_info_client.get_info(
'get_first_parent_descendants')
self.all_families = self.suite_info_client.get_info('get_all_families')

(self.ancestors, self.ancestors_pruned, self.descendants,
self.all_families) = self.suite_info_client.get_info(
{'function': 'get_first_parent_ancestors'},
{'function': 'get_first_parent_ancestors', 'pruned': True},
{'function': 'get_first_parent_descendants'},
{'function': 'get_all_families'})

self.mode = glbl['run_mode']

Expand Down Expand Up @@ -400,7 +399,7 @@ def update(self):
try:
err_log_changed = self.retrieve_err_log()
summaries_changed = self.retrieve_summary_update_time()
if self.summary_update_time is not None:
if self.summary_update_time is not None and summaries_changed:
self.retrieve_state_summaries()
except Exception as exc:
if self.status == SUITE_STATUS_STOPPING:
Expand Down
Loading

0 comments on commit afe5ba6

Please sign in to comment.