mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-17 19:06:36 +01:00
Fix case where user's cgroup says it has 0 cpu cores (#13271)
This commit is contained in:
parent
9b4602acb3
commit
13bb9dd715
@ -38,7 +38,7 @@ function get_cpus() {
|
||||
fi
|
||||
|
||||
local cpus
|
||||
if [ -n "${quota}" ] && [ -n "${period}" ]; then
|
||||
if [ "${period}" != "0" ] && [ -n "${quota}" ] && [ -n "${period}" ]; then
|
||||
cpus=$((quota / period))
|
||||
if [ "$cpus" -eq 0 ]; then
|
||||
cpus=1
|
||||
|
Loading…
Reference in New Issue
Block a user