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

I/O in event loop #14

Closed
balloob opened this issue Feb 23, 2020 · 1 comment
Closed

I/O in event loop #14

balloob opened this issue Feb 23, 2020 · 1 comment

Comments

@balloob
Copy link

balloob commented Feb 23, 2020

Version of the custom_component

Current master branch.

Configuration

Add your logs here.

Describe the bug

I was interested in what this integration did. README wasn't very descriptive so browsing through the code and it's doing I/O inside the event loop. This should be done inside the executor worker thread.

if not os.path.exists(fullpath):

Change async def -> def and then run `result = await hass.async_add_executor_job(check_files)

Debug log


Add your logs here.

@zachowj
Copy link
Owner

zachowj commented Feb 26, 2020

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants