Skip to content

Commit

Permalink
Add guard check for the resource name for overage detection
Browse files Browse the repository at this point in the history
  • Loading branch information
John Wregglesworth committed Dec 6, 2022
1 parent 712d6ef commit 07c1471
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 07c1471

Please sign in to comment.