Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 5694bcd2 authored by Lucas Nussbaum's avatar Lucas Nussbaum
Browse files

[dev] fix nodes count (exclude retired nodes)

parent e058f658
No related branches found
No related tags found
No related merge requests found
Pipeline #75349 passed
...@@ -35,9 +35,9 @@ class G5KHardwareGenerator < WikiGenerator ...@@ -35,9 +35,9 @@ class G5KHardwareGenerator < WikiGenerator
@global_hash['sites'].sort.to_h.each do |site_uid, site_hash| @global_hash['sites'].sort.to_h.each do |site_uid, site_hash|
clusters += site_hash['clusters'].length clusters += site_hash['clusters'].length
site_hash['clusters'].sort.to_h.each do |cluster_uid, cluster_hash| site_hash['clusters'].sort.to_h.each do |cluster_uid, cluster_hash|
nodes += cluster_hash['nodes'].length
cluster_hash['nodes'].sort.to_h.each do |node_uid, node_hash| cluster_hash['nodes'].sort.to_h.each do |node_uid, node_hash|
next if node_hash['status'] == 'retired' next if node_hash['status'] == 'retired'
nodes += 1
cores += node_hash['architecture']['nb_cores'] cores += node_hash['architecture']['nb_cores']
if node_hash['gpu'] and node_hash['gpu']['gpu_count'] if node_hash['gpu'] and node_hash['gpu']['gpu_count']
gpus += node_hash['gpu']['gpu_count'] gpus += node_hash['gpu']['gpu_count']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment