Skip to content

Commit

Permalink
repairTask: make intensity to be float on manager side
Browse files Browse the repository at this point in the history
Fixes #309
  • Loading branch information
dkropachev authored and zimnx committed Dec 28, 2020
1 parent 874d8bc commit d6ec4d3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/controllers/manager/types.go
Expand Up @@ -3,6 +3,7 @@
package manager

import (
"strconv"
"strings"

"github.com/mitchellh/mapstructure"
Expand Down Expand Up @@ -57,8 +58,13 @@ func (r RepairTask) ToManager() (*mermaidclient.Task, error) {
props["fail_fast"] = true
}
}

if r.Intensity != nil {
props["intensity"] = *r.Intensity
intensity, err := strconv.ParseFloat(*r.Intensity, 64)
if err != nil {
return nil, errors.Wrap(err, "parse intensity")
}
props["intensity"] = intensity
}
if r.Parallel != nil {
props["parallel"] = *r.Parallel
Expand Down

0 comments on commit d6ec4d3

Please sign in to comment.