mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Create recorder futures with loop.create_future() (#100049)
This commit is contained in:
parent
51899ce5ad
commit
50382a609c
@ -187,7 +187,7 @@ class Recorder(threading.Thread):
|
||||
self.auto_purge = auto_purge
|
||||
self.auto_repack = auto_repack
|
||||
self.keep_days = keep_days
|
||||
self._hass_started: asyncio.Future[object] = asyncio.Future()
|
||||
self._hass_started: asyncio.Future[object] = hass.loop.create_future()
|
||||
self.commit_interval = commit_interval
|
||||
self._queue: queue.SimpleQueue[RecorderTask] = queue.SimpleQueue()
|
||||
self.db_url = uri
|
||||
@ -198,7 +198,7 @@ class Recorder(threading.Thread):
|
||||
db_connected: asyncio.Future[bool] = hass.data[DOMAIN].db_connected
|
||||
self.async_db_connected: asyncio.Future[bool] = db_connected
|
||||
# Database is ready to use but live migration may be in progress
|
||||
self.async_db_ready: asyncio.Future[bool] = asyncio.Future()
|
||||
self.async_db_ready: asyncio.Future[bool] = hass.loop.create_future()
|
||||
# Database is ready to use and all migration steps completed (used by tests)
|
||||
self.async_recorder_ready = asyncio.Event()
|
||||
self._queue_watch = threading.Event()
|
||||
|
Loading…
x
Reference in New Issue
Block a user