Skip to content

Commit

Permalink
fix memory scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelvigee committed Apr 8, 2024
1 parent 3cb8b1b commit 8e45bcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ type Bootstrap struct {

func DefaultScheduler(cpu int) *worker2.ResourceScheduler {
return worker2.NewResourceScheduler(map[string]float64{
"cpu": float64(cpu),
"mem": float64(memory.TotalMemory()),
"cpu": float64(cpu),
"memory": float64(memory.TotalMemory()),
}, map[string]float64{
"cpu": float64(1),
})
Expand Down
4 changes: 2 additions & 2 deletions hbuiltin/target_spec_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ func specFromArgs(args TargetArgs, pkg *packages.Package) (specs.Target, error)
}

t.Requests = map[string]float64{
"cpu": 1,
"mem": 100000000, // 1M
"cpu": 1,
"memory": 100000000, // 1M
}
for _, item := range args.Requests.Items() {
v, err := requestFromArg(item.Value)
Expand Down

0 comments on commit 8e45bcf

Please sign in to comment.