Add recorder vars db_max_retries and db_retry_wait (#31561)

* added recorder vars db_max_retries and db_retry_wait

* fixed test_recorder_setup_failure

I failed because it was missing the two new variables. I simply added these with default values.

* fixed syntax error in test_recorder_setup_failure

* fixed formatting error in test_init_py for recorder component

* fixed typo in test case

* Updated the way the default keys for db_,max_wait and db_retry_wait is set

Implemented based on suggestions from @springstan

* Updated config_schema call to adhere to Black

* changed conf.get to conf[dict] for var retrieval

* removed 2 blank lines
This commit is contained in:
Jonathan Østrup authored and GitHub committed 2020-02-09 17:43:09 +01:00
1 parent 645c673720
commit 150b376cf9
2 files changed
+32 -9

No files matched your search

+8 -1
View File
@@ -198,7 +198,14 @@ def test_recorder_setup_failure():
):
setup.side_effect = ImportError("driver not found")
rec = Recorder(
hass, keep_days=7, purge_interval=2, uri="sqlite://", include={}, exclude={}
hass,
keep_days=7,
purge_interval=2,
uri="sqlite://",
db_max_retries=10,
db_retry_wait=3,
include={},
exclude={},
)
rec.start()
rec.join()