remove tmpfs_cache_size option

This commit is contained in:
Blake Blackshear 2021-02-23 07:41:34 -06:00
parent 6d12a34c40
commit 4252857e19
3 changed files with 0 additions and 19 deletions

View File

@ -78,11 +78,6 @@ clips:
# NOTE: If an object is being tracked for longer than this amount of time, the cache
# will begin to expire and the resulting clip will be the last x seconds of the event.
max_seconds: 300
# Optional: size of tmpfs mount to create for cache files (default: not set)
# mount -t tmpfs -o size={tmpfs_cache_size} tmpfs /tmp/cache
# NOTICE: Addon users must have Protection mode disabled for the addon when using this setting.
# Also, if you have mounted a tmpfs volume through docker, this value should not be set in your config.
tmpfs_cache_size: 256m
# Optional: Retention settings for clips (default: shown below)
retain:
# Required: Default retention days (default: shown below)

View File

@ -55,13 +55,6 @@ class FrigateApp:
else:
logger.debug(f"Skipping directory: {d}")
tmpfs_size = self.config.clips.tmpfs_cache_size
if tmpfs_size:
logger.info(f"Creating tmpfs of size {tmpfs_size}")
rc = os.system(f"mount -t tmpfs -o size={tmpfs_size} tmpfs {CACHE_DIR}")
if rc != 0:
logger.error(f"Failed to create tmpfs, error code: {rc}")
def init_logger(self):
self.log_process = mp.Process(
target=log_process, args=(self.log_queue,), name="log_process"

View File

@ -48,7 +48,6 @@ RETAIN_SCHEMA = vol.Schema(
CLIPS_SCHEMA = vol.Schema(
{
vol.Optional("max_seconds", default=300): int,
"tmpfs_cache_size": str,
vol.Optional("retain", default={}): RETAIN_SCHEMA,
}
)
@ -541,17 +540,12 @@ class RetainConfig:
class ClipsConfig:
def __init__(self, config):
self._max_seconds = config["max_seconds"]
self._tmpfs_cache_size = config.get("tmpfs_cache_size", "").strip()
self._retain = RetainConfig(config["retain"], config["retain"])
@property
def max_seconds(self):
return self._max_seconds
@property
def tmpfs_cache_size(self):
return self._tmpfs_cache_size
@property
def retain(self):
return self._retain
@ -559,7 +553,6 @@ class ClipsConfig:
def to_dict(self):
return {
"max_seconds": self.max_seconds,
"tmpfs_cache_size": self.tmpfs_cache_size,
"retain": self.retain.to_dict(),
}