1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-06-07 14:21:55 +00:00
This commit is contained in:
Newnius 2020-06-18 21:18:20 +08:00
parent b315e3da8e
commit a70cf21920

View File

@ -432,8 +432,8 @@ func (scheduler *SchedulerFair) Schedule(job Job) {
job.NumberGPU = numberGPU
job.Status = Created
job.BasePriority = float64(len(scheduler.queues[queue])) / 10000
job.BasePriority = -float64(time.Now().Unix()) / 10000000000
scheduler.queues[queue][index] = job
}
@ -673,6 +673,7 @@ func (scheduler *SchedulerFair) QueryState(jobName string) MsgJobStatus {
}
func (scheduler *SchedulerFair) Stop(jobName string) MsgStop {
log.Info("Stop job ", jobName)
scheduler.queuesMu.Lock()
jm, ok := scheduler.jobs[jobName]
scheduler.queuesMu.Unlock()