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

Clear recorder startup tasks from memory after processing #90240

Merged
merged 2 commits into from
Mar 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions homeassistant/components/recorder/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,10 @@ def _run_event_loop(self) -> None:
for task in startup_tasks:
self._guarded_process_one_task_or_recover(task)

# Clear startup tasks since this thread runs forever
# and we don't want to hold them in memory
del startup_tasks

self.stop_requested = False
while not self.stop_requested:
self._guarded_process_one_task_or_recover(queue_.get())
Expand Down