Skip to content

Commit

Permalink
Increase the timeout for charmstore connections (#262)
Browse files Browse the repository at this point in the history
* Increase the timeout for charmstore connections

The charm store often does not respond in 5s. Increase the timeout
to 20s. Charm store issue being tracked in canonical/jujucharms.com#551
. Closes issue 261.

* Allow charm store timeout to be configurable
  • Loading branch information
Liam Young authored and johnsca committed Sep 17, 2018
1 parent 4a6e398 commit c7c5c54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions juju/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2160,9 +2160,9 @@ class CharmStore:
"""
Async wrapper around theblues.charmstore.CharmStore
"""
def __init__(self, loop):
def __init__(self, loop, cs_timeout=20):
self.loop = loop
self._cs = theblues.charmstore.CharmStore(timeout=5)
self._cs = theblues.charmstore.CharmStore(timeout=cs_timeout)

def __getattr__(self, name):
"""
Expand Down

0 comments on commit c7c5c54

Please sign in to comment.