Skip to content

Commit

Permalink
handle case that os.cpu_count is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros-k committed Jul 22, 2024
1 parent ccb7163 commit b7e66a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migration_helpers/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
}
Expand Down

0 comments on commit b7e66a4

Please sign in to comment.