mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-16 00:26:43 +00:00
set parallelism
This commit is contained in:
@@ -13,8 +13,9 @@ type SchedulerFCFS struct {
|
||||
mu sync.Mutex
|
||||
scheduling sync.Mutex
|
||||
|
||||
jobs map[string]*JobManager
|
||||
enabled bool
|
||||
jobs map[string]*JobManager
|
||||
enabled bool
|
||||
parallelism int
|
||||
}
|
||||
|
||||
func (scheduler *SchedulerFCFS) Start() {
|
||||
@@ -254,3 +255,9 @@ func (scheduler *SchedulerFCFS) Disable() bool {
|
||||
scheduler.enabled = false
|
||||
return true
|
||||
}
|
||||
|
||||
func (scheduler *SchedulerFCFS) UpdateParallelism(parallelism int) bool {
|
||||
scheduler.parallelism = parallelism
|
||||
log.Info("parallelism is updated to", parallelism)
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user