fix bugs in autoupdater query builder returns

This commit is contained in:
Christoph Kluge 2024-09-25 18:05:04 +02:00
parent 05517fcbcd
commit f53fc088ec

View File

@ -592,10 +592,7 @@ func (r *JobRepository) UpdateEnergy(
return stmt, err
}
stmt.Set("energy_footprint", rawFootprint).
Set("energy", totalEnergy)
return stmt, nil
return stmt.Set("energy_footprint", rawFootprint).Set("energy", totalEnergy), nil
}
func (r *JobRepository) UpdateFootprint(
@ -617,7 +614,7 @@ func (r *JobRepository) UpdateFootprint(
}
name := fmt.Sprintf("%s_%s", fp, statType)
footprint[fp] = LoadJobStat(jobMeta, name, statType)
footprint[name] = LoadJobStat(jobMeta, fp, statType)
}
var rawFootprint []byte
@ -627,6 +624,5 @@ func (r *JobRepository) UpdateFootprint(
return stmt, err
}
stmt.Set("footprint", rawFootprint)
return stmt, nil
return stmt.Set("footprint", rawFootprint), nil
}