mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-12 23:36:44 +00:00
[bugfix] support switch scheduler.strategy
This commit is contained in:
11
src/main.go
11
src/main.go
@@ -321,6 +321,14 @@ func serverAPI(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
break
|
||||
|
||||
/* scheduler.strategy */
|
||||
/* TODO: move jobs */
|
||||
case "scheduler.strategy":
|
||||
ok = InstanceOfConfiguration().SetSchedulePolicy(value)
|
||||
scheduler = InstanceOfConfiguration().GetScheduler()
|
||||
scheduler.Start()
|
||||
break
|
||||
|
||||
/* scheduler.mock */
|
||||
case "scheduler.mock.enabled":
|
||||
ok = InstanceOfConfiguration().SetMockEnabled(value == "true")
|
||||
@@ -344,11 +352,8 @@ func serverAPI(w http.ResponseWriter, r *http.Request) {
|
||||
break
|
||||
|
||||
/* allocator.strategy */
|
||||
/* TODO: move jobs */
|
||||
case "allocator.strategy":
|
||||
ok = InstanceOfAllocator().updateStrategy(value)
|
||||
scheduler = InstanceOfConfiguration().GetScheduler()
|
||||
scheduler.Start()
|
||||
break
|
||||
|
||||
/* logger */
|
||||
|
||||
Reference in New Issue
Block a user