-
-
Notifications
You must be signed in to change notification settings - Fork 29k
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
Fix Starlink integration startup issue #114615
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Hey there @boswelja, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
@Fexiven Can you please update the PR title to be descriptive? Thanks! 👍 |
Are we sure removing the parallelism here is the only solution? |
I've tried a few things to make it parallel, but every time I tried something else, it broke. Maybe someone else is more python affine to do it? |
That's not me 😆 I think we can merge this as a workaround, I will open an issue to track the work later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @Fexiven 👍
../Frenck
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address the comment in a new PR. Thanks!
location = await self.hass.async_add_executor_job( | ||
location_data, self.channel_context | ||
) | ||
sleep = await self.hass.async_add_executor_job( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of scheduling three executor jobs sequentially, we should rewrite this to just schedule one executor job and do all the sync work in a single function. Create a function that calls status_data
, location_data
and get_sleep_config
and schedule the function once on the executor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I commented this on the previous PR two weeks ago:
#103057 (comment)
fixes #114353
It seems async.gather doesn't work right with async_add_executor_job
Breaking change
Proposed change
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: