mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 17:55:21 +03:00
format code
This commit is contained in:
parent
70b9e96915
commit
2c02459bd6
@ -737,6 +737,7 @@ def escape_special_characters(path: str) -> str:
|
||||
# path does not have user:pass
|
||||
return path
|
||||
|
||||
|
||||
def get_cgroups_version() -> str:
|
||||
"""Determine what version of cgroups is enabled"""
|
||||
|
||||
@ -756,7 +757,9 @@ def get_cgroups_version() -> str:
|
||||
elif value == "tmpfs":
|
||||
return "cgroup"
|
||||
else:
|
||||
logger.debug(f"Could not determine cgroups version: unhandled filesystem {value}")
|
||||
logger.debug(
|
||||
f"Could not determine cgroups version: unhandled filesystem {value}"
|
||||
)
|
||||
else:
|
||||
logger.debug(f"Could not determine cgroups version: {p.stderr}")
|
||||
|
||||
@ -767,7 +770,7 @@ def get_docker_memlimit_bytes() -> int:
|
||||
"""Get mem limit in bytes set in docker if present. Returns -1 if no limit detected"""
|
||||
|
||||
# check running a supported cgroups version
|
||||
if (get_cgroups_version() == "cgroup2"):
|
||||
if get_cgroups_version() == "cgroup2":
|
||||
|
||||
memlimit_command = ["cat", "/sys/fs/cgroup/memory.max"]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user