Skip to content

Commit

Permalink
Merge pull request #54 from cyverse-de/fix-overage-checks
Browse files Browse the repository at this point in the history
Add guard check for the resource name for overage detection
  • Loading branch information
johnworth authored Dec 6, 2022
2 parents c4e62ab + 07c1471 commit d26d267
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/limits.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func validateJobLimits(user string, defaultJobLimit, jobCount int, jobLimit *int
details := make(map[string]interface{})

for _, ov := range overages.Overages {
if ov.Usage >= ov.Quota {
if ov.Usage >= ov.Quota && ov.ResourceName == "cpu.hours" {
inOverage = true
details[ov.ResourceName] = fmt.Sprintf("quota: %f, usage: %f", ov.Quota, ov.Usage)
}
Expand Down

0 comments on commit d26d267

Please sign in to comment.