Ver Fonte

remove tmpfs_cache_size option

Blake Blackshear há 4 anos atrás
pai
commit
4252857e19
3 ficheiros alterados com 0 adições e 19 exclusões
  1. 0 5
      docs/docs/configuration/index.md
  2. 0 7
      frigate/app.py
  3. 0 7
      frigate/config.py

+ 0 - 5
docs/docs/configuration/index.md

@@ -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)

+ 0 - 7
frigate/app.py

@@ -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"

+ 0 - 7
frigate/config.py

@@ -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(),
         }