Skip to content

Commit

Permalink
Fix scheduler plugin arguments readin bug.
Browse files Browse the repository at this point in the history
Signed-off-by: jiangkaihua <[email protected]>
  • Loading branch information
jiangkaihua committed Oct 17, 2022
1 parent 59e58c2 commit b6ca9cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/scheduler/framework/arguments.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ func (a Arguments) GetFloat64(ptr *float64, key string) {

value, ok := argv.(float64)
if !ok {
if intVal, ok := argv.(int); ok {
*ptr = float64(intVal)
return
}
klog.Warningf("Could not parse argument: %v for key %s to float64", argv, key)
return
}
Expand Down

0 comments on commit b6ca9cd

Please sign in to comment.