mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-29 20:23:51 -06:00
fix cache cleanup for large full disks
This commit is contained in:
parent
1b85e561b9
commit
a661fddaf3
@ -113,7 +113,7 @@ class EventProcessor(threading.Thread):
|
||||
|
||||
# if we are still using more than 90% of the cache, proactively cleanup
|
||||
cache_usage = shutil.disk_usage("/tmp/cache")
|
||||
if cache_usage.used/cache_usage.total > .9:
|
||||
if cache_usage.used/cache_usage.total > .9 and cache_usage.free < 200000000 and len(self.cached_clips) > 0:
|
||||
logger.warning("More than 90% of the cache is used.")
|
||||
logger.warning("Consider increasing space available at /tmp/cache or reducing max_seconds in your clips config.")
|
||||
logger.warning("Proactively cleaning up the cache...")
|
||||
|
Loading…
Reference in New Issue
Block a user