Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hzxuzhonghu committed Jun 30, 2020
1 parent 34fc875 commit edbb3ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/scheduler/api/pod_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ func EscapeJsonPointer(p string) string {

// AddGPUIndexPatch returns the patch adding GPU index
func AddGPUIndexPatch(id int) string {
return fmt.Sprintf(`[{"op": "add", "path": "/metadata/annotations/%s", "value": %s},`+
`{"op": "add", "path": "/metadata/annotations/%s", "value": %s}]`,
EscapeJsonPointer(PredicateTime), strconv.FormatInt(time.Now().UnixNano(), 10),
EscapeJsonPointer(GPUIndex), strconv.Itoa(id))
return fmt.Sprintf(`[{"op": "add", "path": "/metadata/annotations/%s", "value":"%d"},`+
`{"op": "add", "path": "/metadata/annotations/%s", "value": "%d"}]`,
EscapeJsonPointer(PredicateTime), time.Now().UnixNano(),
EscapeJsonPointer(GPUIndex), id)
}

// AddGPUIndexPatch returns the patch removing GPU index
Expand Down

0 comments on commit edbb3ca

Please sign in to comment.