Skip to content

Commit

Permalink
Merge pull request #220 from pixlise/feature/quant-fit
Browse files Browse the repository at this point in the history
Feature/quant fit
  • Loading branch information
pnemere committed May 7, 2024
2 parents 28552a9 + a950c6b commit f097a4f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 15 additions & 2 deletions api/quantification/quantRunner/runnerKubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ func (r *kubernetesRunner) runQuantJob(params PiquantParams, jobId, namespace, s
// Query the status of the job and report on the number of completed pods
startTS := time.Now().Unix()

lastStatusMsg := ""

for {
time.Sleep(5 * time.Second)

Expand All @@ -219,8 +221,19 @@ func (r *kubernetesRunner) runQuantJob(params PiquantParams, jobId, namespace, s
r.fatalErrors <- err
return
}
statusMsg := fmt.Sprintf("Success %v, Fail %v, Active %v, Ready %v of %v", jobStatus.Succeeded, jobStatus.Failed, jobStatus.Active, jobStatus.Ready, count)
status <- statusMsg

ready := int32(0)
if jobStatus.Ready != nil {
ready = *jobStatus.Ready
}
statusMsg := fmt.Sprintf("Success %v, Fail %v, Active %v, Ready %v of %v", jobStatus.Succeeded, jobStatus.Failed, jobStatus.Active, ready, count)

// Only send out a status if there's something new
if lastStatusMsg != statusMsg {
status <- statusMsg
lastStatusMsg = statusMsg
}

if jobStatus.Succeeded == int32(count) {
break
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd-line-tools/api-integration-test/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ func runLocalTests(apiHost string, isCI bool) {
}
testUserGroups(apiHost)
testLogMsgs(apiHost)
testScanData(apiHost, 0 /*3 for proper testing*/)
testScanData(apiHost, 2 /*3 for proper testing*/)
testDetectorConfig(apiHost)

testTags(apiHost)
Expand Down

0 comments on commit f097a4f

Please sign in to comment.