blakeblackshear.frigate/frigate
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
..
test Limit recording retention to available storage (#3942) 2022-10-09 06:28:26 -05:00
__init__.py
__main__.py Typing: mypy fixes for 2022-04-17 08:55:38 -05:00
app.py Limit recording retention to available storage (#3942) 2022-10-09 06:28:26 -05:00
birdseye.png
config.py update stimeout to timeout 2022-07-05 11:55:55 -05:00
const.py add endpoint to submit to plus 2022-04-10 09:11:16 -05:00
edgetpu.py Modernizing Typing 2022-04-17 08:55:38 -05:00
events.py lint fixes 2022-04-16 09:08:10 -05:00
http.py Limit recording retention to available storage (#3942) 2022-10-09 06:28:26 -05:00
log.py Add basic typing for multiple modules: 2022-04-15 07:01:43 -05:00
models.py Limit recording retention to available storage (#3942) 2022-10-09 06:28:26 -05:00
motion.py Adjust threshold and contour_area with mqtt 2022-07-05 08:46:10 -05:00
mqtt.py Update MQTT along with enabling motion detection (#3898) 2022-10-01 09:01:43 -05:00
mypy.ini Typing: mypy fixes for 2022-04-17 08:55:38 -05:00
object_processing.py Mqtt sub labels (#3899) 2022-10-01 09:00:56 -05:00
objects.py cleanup print statements 2022-04-16 09:08:10 -05:00
output.py Allow birdseye to be overridden at the camera level (#3083) 2022-04-15 06:59:30 -05:00
plus.py read plus api key from addon options 2022-06-30 07:19:40 -05:00
record.py Limit recording retention to available storage (#3942) 2022-10-09 06:28:26 -05:00
stats.py Set a timeout on github release check (#3969) 2022-10-01 08:58:23 -05:00
storage.py Limit recording retention to available storage (#3942) 2022-10-09 06:28:26 -05:00
types.py Adjust threshold and contour_area with mqtt 2022-07-05 08:46:10 -05:00
util.py fix depreciated import from collections 2022-04-15 07:01:43 -05:00
video.py BUG: Fixes and cleanup around region / bounding box calculation (#3879) 2022-09-22 08:07:16 -05:00
watchdog.py Typing: mypy fixes for 2022-04-17 08:55:38 -05:00
zeroconf.py Add basic typing for multiple modules: 2022-04-15 07:01:43 -05:00