Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

pdutil: use the correct unit for pausing schedulers #1466

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/pdutil/pd.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ func (p *PdController) getStoreInfoWith(

func (p *PdController) doPauseSchedulers(ctx context.Context, schedulers []string, post pdHTTPRequest) ([]string, error) {
// pause this scheduler with 300 seconds
body, err := json.Marshal(pauseSchedulerBody{Delay: int64(pauseTimeout)})
body, err := json.Marshal(pauseSchedulerBody{Delay: int64(pauseTimeout.Seconds())})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or use .Milliseconds() / 1000

if err != nil {
return nil, errors.Trace(err)
}
Expand Down