Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce number of HTTP connections to address CPU usage #2271

Merged
merged 6 commits into from
May 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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