1
0
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:
2020-08-13 19:41:05 +08:00
parent 64bd28e83c
commit 72cb0693a5

View File

@@ -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 */