Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filter for non-production runs #138

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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