mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Finish all tasks before setup phase is done (#4606)
This commit is contained in:
@@ -236,6 +236,12 @@ class HomeAssistant(object):
|
||||
"""Track tasks so you can wait for all tasks to be done."""
|
||||
self.async_add_job = self._async_add_job_tracking
|
||||
|
||||
@asyncio.coroutine
|
||||
def async_stop_track_tasks(self):
|
||||
"""Track tasks so you can wait for all tasks to be done."""
|
||||
yield from self.async_block_till_done()
|
||||
self.async_add_job = self._async_add_job
|
||||
|
||||
@callback
|
||||
def async_run_job(self, target: Callable[..., None], *args: Any) -> None:
|
||||
"""Run a job from within the event loop.
|
||||
|
||||
Reference in New Issue
Block a user