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

Build JSON in executor #12536

Merged
merged 1 commit into from
Feb 20, 2018
Merged

Conversation

amelchio
Copy link
Contributor

Description:

This is to help with situations like this.

Related issue (if applicable): fixes #

Checklist:

  • The code change is tested and works locally.

If the code does not interact with devices:

  • Local tests with tox run successfully.
  • Tests have been added to verify that the new code works.

@balloob
Copy link
Member

balloob commented Feb 20, 2018

I wonder if we should add a keyword only parameter to self.json to offload JSONifying to the executor.

@amelchio
Copy link
Contributor Author

I was hoping that it would not be needed much.

I can make the change if you want but I am not sure how to offload since self.json appears to have no hass handle handy?

@balloob
Copy link
Member

balloob commented Feb 20, 2018

Ah yes, you're right. And it is also a callback and not a coroutine. Let's just limit it to history and logbook for now then.

@pvizeli
Copy link
Member

pvizeli commented Feb 20, 2018

Yeah good catch. If we see more problems, we can make a more generic fix, but for now it should be okay.

@pvizeli pvizeli merged commit fb985e2 into home-assistant:dev Feb 20, 2018
@balloob balloob mentioned this pull request Feb 22, 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.

4 participants