blakeblackshear.frigate/frigate/test
Nicolas Mowen b4d4adb75b
Limit recording retention to available storage (#3942)
* Add field and migration for segment size

* Store the segment size in db

* Add comment

* Add default

* Fix size parsing

* Include segment size in recordings endpoint

* Start adding storage maintainer

* Add storage maintainer and calculate average sizes

* Update comment

* Store segment and hour avg sizes per camera

* Formatting

* Keep track of total segment and hour averages

* Remove unused files

* Cleanup 2 hours of recordings at a time

* Formatting

* Fix bug

* Round segment size

* Cleanup some comments

* Handle case where segments are not deleted on initial run or is only retained segments

* Improve cleanup log

* Formatting

* Fix typo and improve logging

* Catch case where no recordings exist for camera

* Specifically define sort

* Handle edge case for cameras that only record part time

* Increase definition of part time recorder

* Remove warning about not supported storage based retention

* Add note about storage based retention to recording docs

* Add tests for storage maintenance calculation and cleanup

* Format tests

* Don't run for a camera with no recording segments

* Get size of file from cache

* Rework camera stats to be more efficient

* Remove total and other inefficencies

* Rewrite storage cleanup logic to be much more efficient

* Fix existing tests

* Fix bugs from tests

* Add another test

* Improve logging

* Formatting

* Set back correct loop time

* Update name

* Update comment

* Only include segments that have a nonzero size

* Catch case where camera has 0 nonzero segment durations

* Add test to cover zero bandwidth migration case

* Fix test

* Incorrect boolean logic

* Formatting

* Explicity re-define iterator
2022-10-09 06:28:26 -05:00
..
__init__.py app container and config schema 2021-01-26 21:40:33 -06:00
const.py Http tests (#3350) 2022-06-30 07:53:46 -05:00
test_config.py fix birdseye config 2022-04-16 09:08:10 -05:00
test_copy_yuv_to_position.py maintain aspect ratio for birdseye 2021-06-23 08:15:15 -05:00
test_http.py fix plus enabled for addons 2022-07-22 08:12:58 -05:00
test_reduce_boxes.py Run python unit tests in a github actions (#2589) 2022-02-18 21:18:26 -06:00
test_storage.py Limit recording retention to available storage (#3942) 2022-10-09 06:28:26 -05:00
test_yuv_region_2_rgb.py add lint check to workflow 2022-04-16 09:08:10 -05:00