mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Remove BaseTableManager active attribute (#121020)
This commit is contained in:
parent
510315732a
commit
a4d889e958
@ -24,7 +24,6 @@ class BaseTableManager[_DataT]:
|
||||
for a table. When data is committed to the database, the
|
||||
manager will move the data from the pending to the id map.
|
||||
"""
|
||||
self.active = False
|
||||
self.recorder = recorder
|
||||
self._pending: dict[EventType[Any] | str, _DataT] = {}
|
||||
|
||||
|
@ -32,7 +32,6 @@ class EventDataManager(BaseLRUTableManager[EventData]):
|
||||
def __init__(self, recorder: Recorder) -> None:
|
||||
"""Initialize the event type manager."""
|
||||
super().__init__(recorder, CACHE_SIZE)
|
||||
self.active = True # always active
|
||||
|
||||
def serialize_from_event(self, event: Event) -> bytes | None:
|
||||
"""Serialize event data."""
|
||||
|
@ -28,6 +28,8 @@ CACHE_SIZE = 2048
|
||||
class EventTypeManager(BaseLRUTableManager[EventTypes]):
|
||||
"""Manage the EventTypes table."""
|
||||
|
||||
active = False
|
||||
|
||||
def __init__(self, recorder: Recorder) -> None:
|
||||
"""Initialize the event type manager."""
|
||||
super().__init__(recorder, CACHE_SIZE)
|
||||
|
@ -37,7 +37,6 @@ class StateAttributesManager(BaseLRUTableManager[StateAttributes]):
|
||||
def __init__(self, recorder: Recorder) -> None:
|
||||
"""Initialize the event type manager."""
|
||||
super().__init__(recorder, CACHE_SIZE)
|
||||
self.active = True # always active
|
||||
|
||||
def serialize_from_event(self, event: Event[EventStateChangedData]) -> bytes | None:
|
||||
"""Serialize event data."""
|
||||
|
@ -24,6 +24,8 @@ CACHE_SIZE = 8192
|
||||
class StatesMetaManager(BaseLRUTableManager[StatesMeta]):
|
||||
"""Manage the StatesMeta table."""
|
||||
|
||||
active = False
|
||||
|
||||
def __init__(self, recorder: Recorder) -> None:
|
||||
"""Initialize the states meta manager."""
|
||||
self._did_first_load = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user