Skip to content

Commit

Permalink
Fix type conversion
Browse files Browse the repository at this point in the history
Signed-off-by: JmPotato <ghzpotato@gmail.com>
  • Loading branch information
JmPotato committed Jul 24, 2024
1 parent 60448fc commit f3fdd2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/ddl/ddl_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -3658,9 +3658,9 @@ func SetDirectResourceGroupRunawayOption(resourceGroupSettings *model.ResourceGr
}
settings.ExecElapsedTimeMs = uint64(dur.Milliseconds())
case ast.RunawayAction:
settings.Action = model.RunawayActionType(opt.ActionOption.Type)
settings.Action = opt.ActionOption.Type
case ast.RunawayWatch:
settings.WatchType = model.RunawayWatchType(opt.WatchOption.Type)
settings.WatchType = opt.WatchOption.Type
if dur := opt.WatchOption.Duration; len(dur) > 0 {
dur, err := time.ParseDuration(dur)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/executor/internal/querywatch/query_watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func setWatchOption(ctx context.Context,
return errors.Errorf("only support one SQL")
}
sql := stmts[0].Text()
switch model.RunawayWatchType(watchType) {
switch watchType {
case model.WatchNone:
return errors.Errorf("watch type must be specified")
case model.WatchExact:
Expand Down

0 comments on commit f3fdd2a

Please sign in to comment.