Skip to content

Commit

Permalink
Merge pull request #138 from grisu48/group0
Browse files Browse the repository at this point in the history
Add filter for non-production runs
  • Loading branch information
grisu48 authored Mar 21, 2024
2 parents 048f00f + 434a92e commit b871897
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/openqa-revtui/openqa-revtui.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ func FetchJobs(instance *gopenqa.Instance, callback FetchJobsCallback) ([]gopenq
if err != nil {
return ret, err
}

// Limit jobs to at most MaxJobs
if len(jobs) > cf.MaxJobs {
jobs = jobs[:cf.MaxJobs]
Expand All @@ -249,8 +250,8 @@ func FetchJobs(instance *gopenqa.Instance, callback FetchJobsCallback) ([]gopenq
return jobs, err
}
for _, job := range jobs {
// Filter too old jobs
if !isJobTooOld(job, group.MaxLifetime) {
// Filter too old jobs and jobs with group=0
if job.GroupID == 0 || !isJobTooOld(job, group.MaxLifetime) {
ret = append(ret, job)
}
}
Expand Down

0 comments on commit b871897

Please sign in to comment.