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

set include_stats to false to reduce request time #266

Merged
merged 1 commit into from
Sep 18, 2018
Merged
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
6 changes: 4 additions & 2 deletions juju/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,8 @@ async def deploy(
if is_local:
entity_id = entity_url.replace('local:', '')
else:
entity = await self.charmstore.entity(entity_url, channel=channel)
entity = await self.charmstore.entity(entity_url, channel=channel,
include_stats=False)
entity_id = entity['Id']

client_facade = client.ClientFacade.from_connection(self.connection())
Expand Down Expand Up @@ -1336,7 +1337,8 @@ async def deploy(
async def _add_store_resources(self, application, entity_url, entity=None):
if not entity:
# avoid extra charm store call if one was already made
entity = await self.charmstore.entity(entity_url)
entity = await self.charmstore.entity(entity_url,
include_stats=False)
resources = [
{
'description': resource['Description'],
Expand Down