Commit Graph

42 Commits (3ef912b7a0c95765f3930d19dce8961b45c9b2e1)

Author SHA1 Message Date
J. Nick Koston 3150915cb7
Convert unindexed domain queries to entity_id queries (#68404) 2022-03-20 01:28:17 -10:00
J. Nick Koston 7ee647cc78
Fix FOREIGN KEY constraint failed when removing state_attributes (#68364) 2022-03-19 14:21:28 -07:00
J. Nick Koston 9215702388
Separate attrs into another table (reduces database size) (#68224) 2022-03-18 00:23:13 -10:00
J. Nick Koston b18096fc54
Remove unused columns from states/events tables (#68078) 2022-03-13 23:44:55 -07:00
Erik Montnemery b301ab25a3
Purge short term statistics (#58028)
* Purge short term statistics

* Less meep

* Add tests
2021-10-20 16:00:59 +02:00
Erik Montnemery 8567aa9e13
Evict purged states from recorder's old_state cache (#56877)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-04 08:21:40 -07:00
PeteBa 42c4317628
Avoid drift in recorder purge cut-off (#52135) 2021-06-25 11:29:38 -10:00
PeteBa aa9b99713c
Add purge_entities service call to recorder (#48069) 2021-05-22 10:30:05 -05:00
Erik Montnemery 89dd3292ba
Initial draft of statistics (#49852) 2021-05-16 10:23:37 -07:00
jan iversen c351098f04
HomeAssistantType —> HomeAssistant for Integrations p* - s* (#49558) 2021-04-22 19:58:02 +02:00
J. Nick Koston 6d137d2316
Increase recorder test coverage (#49362)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-19 08:22:38 -07:00
J. Nick Koston 9368891b1b
Live db migrations and recovery (#49036)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-04-11 20:43:54 -10:00
Franck Nijhof 08870690a6
Fix a collection of tests with missing asserts (#48127)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-20 17:23:55 +01:00
Franck Nijhof fb849b81b5
Rewrite of not a == b occurances (#48132) 2021-03-20 01:27:04 +01:00
J. Nick Koston 28c80c1133
Ensure recorder purge tests can handle multiple purge cycle (#47956)
Since a purge can generate another purge task, we now wait for
three recorder queue completions by default.
2021-03-15 11:19:19 -07:00
J. Nick Koston 61a2460c87
Improve error reporting in recorder purge test (#47929) 2021-03-14 19:46:21 -07:00
Marc Mueller 92852b9c10
Add apply_filter attribute to recorder.purge service (#45826) 2021-03-11 17:03:30 -10:00
Marc Mueller 10848b9bdf
Recorder improvements (#47739) 2021-03-11 07:52:07 -10:00
J. Nick Koston a060acc2b1
Fix recorder with MSSQL (#46678)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-03-09 11:16:19 -10:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
J. Nick Koston 2cbb93be43
Always keep the current recorder run when purging (#43733) 2020-11-30 09:13:50 +01:00
Ariana Hlavaty 1e9e40bf71
Rewrite recorder unittest tests to pytest style test function (#41264) 2020-10-06 21:24:13 +02:00
J. Nick Koston 7878d97588
Use SimpleQueue for recorder (#38967)
Now that python 3.7 is the minimum supported version, we can
use the more efficient SimpleQueue in the recorder as it does
not have to use threading.Lock
2020-08-21 13:54:13 +02:00
Franck Nijhof 79f131066c
Ensure recorder data integrity and MySQL lock error handling (#37228) 2020-06-29 16:23:11 -07:00
Franck Nijhof 7d74b74570
Fix recorder purging by batch processing purges (#37140) 2020-06-26 10:27:45 -07:00
J. Nick Koston ad6315be5c
Ensure recorder runs are cleaned up during purge (#36989)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-22 20:10:05 -07:00
Paulus Schoutsen c33edbe5bb
Use TestCase.addCleanup (#36560) 2020-06-08 12:26:40 -07:00
Paulus Schoutsen 2af984917e
Use asynctest-mock in most places (#35109)
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Bas Nijholt 3d64405896 Sort imports according to PEP8 for recorder (#29652) 2019-12-08 18:48:18 +01:00
bastshoes 0226b76e0a Add support SQL VACUUM for PostgeSQL (#28106)
* Add support SQL VACUUM for PostgeSQL

VACUUM PostgreSQL DB if repack is true

* Update tests
2019-10-22 08:39:26 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Anders Melchiorsen e593383b4d Error handling for recorder purge (#20424) 2019-01-26 11:02:16 +01:00
Anders Melchiorsen f9c02889b2 Remove recorder purge protection (#19358) 2018-12-16 23:31:50 +01:00
Paulus Schoutsen 08fe7c3ece
Pytest tests (#17750)
* Convert core tests

* Convert component tests to use pytest assert

* Lint 🤷‍♂️

* Fix test

* Fix 3 typos in docs
2018-10-24 12:10:05 +02:00
Ville Skyttä dbd0763f83 Grammar and spelling fixes (#16065) 2018-08-19 22:29:08 +02:00
Anders Melchiorsen c1c23bb4b6 Remove automatic sqlite vacuum (#12728) 2018-02-26 22:41:37 -08:00
Paulus Schoutsen 6ee3c1b3e5
Hello Python 3.5 (#12610)
* Hello Python 3.5

* Fix test

* Fix tests

* Fix never awaited block till done warnings
2018-02-22 23:22:27 -08:00
Anders Melchiorsen 247edf1b69 Purge recorder data by default (#12271) 2018-02-11 13:22:59 -08:00
Sean Dague d478517c51 Fix races on recorder test (#11857) 2018-01-22 15:21:56 +01:00
Lukas Barth 909f613324 Do not purge the most recent state for an entity (#11039)
* Protect states that are the most recent states of their entity

* Also protect events

* Some documentation

* Fix SQL
2018-01-01 18:43:10 -08:00
milanvo 3f9d052218 Add recorder purge service, rework purge timer (#9523)
* Add recorder purge service

* Recorder test to match purge config

* Removed purge timer, move service handler to setup, add service description file

* Tests for recorder purge service

* Recorder purge timer rework, add purge service parameter, tests

* Purge service schema change

* Service description change value range

* First cleanup

* Fix name of config
2017-10-04 14:07:42 +02:00
Paulus Schoutsen 61909e873f Feature/reorg recorder (#6237)
* Re-organize recorder

* Fix history

* Fix history stats

* Fix restore state

* Lint

* Fix session reconfigure

* Move imports around

* Do not start recording till HASS started

* Lint

* Fix logbook

* Fix race condition recorder init

* Better reporting on errors
2017-02-26 14:38:06 -08:00