Skip to content

Commit

Permalink
refact: get value from opt param
Browse files Browse the repository at this point in the history
Signed-off-by: lowang-bh <lhui_wang@163.com>
  • Loading branch information
lowang-bh committed Dec 6, 2023
1 parent cccda37 commit 0697ae5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/scheduler/app/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (s *ServerOption) AddFlags(fs *pflag.FlagSet) {
fs.BoolVar(&s.EnableMetrics, "enable-metrics", false, "Enable the metrics function; it is false by default")
fs.StringSliceVar(&s.NodeSelector, "node-selector", nil, "volcano only work with the labeled node, like: --node-selector=volcano.sh/role:train --node-selector=volcano.sh/role:serving")
fs.BoolVar(&s.EnableCacheDumper, "cache-dumper", true, "Enable the cache dumper, it's true by default")
fs.StringVar(&s.CacheDumpFileDir, "dump-dir", "/tmp", "The target dir where the json file put at when dump cache info to json file")
fs.StringVar(&s.CacheDumpFileDir, "cache-dump-dir", "/tmp", "The target dir where the json file put at when dump cache info to json file")
fs.Uint32Var(&s.NodeWorkerThreads, "node-worker-threads", defaultNodeWorkers, "The number of threads syncing node operations.")
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func NewScheduler(config *rest.Config, opt *options.ServerOption) (*Scheduler, e
fileWatcher: watcher,
cache: cache,
schedulePeriod: opt.SchedulePeriod,
dumper: schedcache.Dumper{Cache: cache, RootDir: options.ServerOpts.CacheDumpFileDir},
dumper: schedcache.Dumper{Cache: cache, RootDir: opt.CacheDumpFileDir},
}

return scheduler, nil
Expand Down

0 comments on commit 0697ae5

Please sign in to comment.