fix allocated_draw for inactive PSU
This commit is contained in:
parent
fc930b9ef4
commit
0e7b61012d
1 changed files with 3 additions and 0 deletions
|
|
@ -118,6 +118,9 @@ class PowerSupply():
|
|||
for i, nb_psu in enumerate(nb_psus):
|
||||
nb_psu.allocated_draw = float(psu_cons[i]) * voltage
|
||||
nb_psu.save()
|
||||
if nb_psu.allocated_draw < 1:
|
||||
logging.info('PSU is not connected or in standby mode')
|
||||
continue
|
||||
logging.info('Updated power consumption for PSU {}: {}W'.format(
|
||||
nb_psu.name,
|
||||
nb_psu.allocated_draw,
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue