Skip to content

Retry keyset cloud#12270

Merged
pvizeli merged 3 commits intodevfrom
retry-keyset-cloud
Feb 10, 2018
Merged

Retry keyset cloud#12270
pvizeli merged 3 commits intodevfrom
retry-keyset-cloud

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented Feb 10, 2018

Description:

Sometimes Home Assistant starts up while the internet is not up yet. This can cause the Cloud component to fail to initialize because it is unable to fetch the keyset to validate the auth tokens.

This PR will delay fetching the keyset till Home Assistant is restarted and will keep retrying if fetching fails.

Related issue (if applicable): fixes #11724

Example entry for configuration.yaml (if applicable):

cloud:

Checklist:

  • The code change is tested and works locally.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.


@callback
@bind_hass
def async_call_later(hass, delay, action):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this

@pvizeli pvizeli merged commit f2296e1 into dev Feb 10, 2018
@pvizeli pvizeli deleted the retry-keyset-cloud branch February 10, 2018 10:40
balloob added a commit that referenced this pull request Feb 10, 2018
* Use less threads in helpers.event tests

* Add helpers.event.async_call_later

* Cloud: retry fetching keyset
@balloob balloob mentioned this pull request Feb 10, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloud: Error fetching Cognito keyset:

4 participants