Skip to content

Commit

Permalink
address golangci-lint complaint
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidS-ovm committed Jan 15, 2024
1 parent 3a11cdd commit 6718438
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmd/getchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,12 @@ fetch:
"change-description": changeRes.Msg.Change.Properties.Description,
}).Info("found change")

switch changeRes.Msg.Change.Metadata.RiskCalculationStatus.Status {
case sdp.RiskCalculationStatus_STATUS_INPROGRESS:
if changeRes.Msg.Change.Metadata.RiskCalculationStatus.Status == sdp.RiskCalculationStatus_STATUS_INPROGRESS {
log.WithContext(ctx).WithField("status", changeRes.Msg.Change.Metadata.RiskCalculationStatus.Status.String()).Info("waiting for risk calculation")
time.Sleep(10 * time.Second)
// retry
default:
// it's done
} else {
// it's done (or errored)
break fetch
}
if ctx.Err() != nil {
Expand Down

0 comments on commit 6718438

Please sign in to comment.