mirror of
https://github.com/MAGICGrants/truenas-apps.git
synced 2026-01-09 20:47:58 -05:00
Merge pull request #84 from truenas/fix-helper
handle case that os.cpu_count is zero
This commit is contained in:
@@ -7,7 +7,7 @@ def migrate_resources(resources):
|
||||
if not resources:
|
||||
return {
|
||||
"limits": {
|
||||
"cpus": CPU_COUNT / 2,
|
||||
"cpus": (CPU_COUNT or 2) / 2,
|
||||
"memory": f"{TOTAL_MEM / 1024 / 1024}M",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user