Skip to content
This repository was archived by the owner on Mar 16, 2021. It is now read-only.

Commit dba2e43

Browse files
dmitri-ddLobatog
authored andcommitted
fixes #8784: defines max_cpu_count for docker compute resource
1 parent f4c209f commit dba2e43

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

app/models/foreman_docker/docker.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ def max_memory
2424
16 * 1024 * 1024 * 1024
2525
end
2626

27+
def max_cpu_count
28+
::Docker.info['NCPU'] || 1
29+
end
30+
2731
def available_images
2832
client.images.all
2933
end

0 commit comments

Comments
 (0)