mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-15 08:16:43 +00:00
update
This commit is contained in:
@@ -691,7 +691,8 @@ func (scheduler *SchedulerFair) Stop(jobName string) MsgStop {
|
|||||||
if index != -1 {
|
if index != -1 {
|
||||||
(&scheduler.queues[queue][index]).Status = Stopped
|
(&scheduler.queues[queue][index]).Status = Stopped
|
||||||
scheduler.historyMu.Lock()
|
scheduler.historyMu.Lock()
|
||||||
scheduler.history = append(scheduler.history, &scheduler.queues[queue][index])
|
job := scheduler.queues[queue][index]
|
||||||
|
scheduler.history = append(scheduler.history, &job)
|
||||||
scheduler.historyMu.Unlock()
|
scheduler.historyMu.Unlock()
|
||||||
copy(scheduler.queues[queue][index:], scheduler.queues[queue][index+1:])
|
copy(scheduler.queues[queue][index:], scheduler.queues[queue][index+1:])
|
||||||
scheduler.queues[queue] = scheduler.queues[queue][:len(scheduler.queues[queue])-1]
|
scheduler.queues[queue] = scheduler.queues[queue][:len(scheduler.queues[queue])-1]
|
||||||
|
|||||||
Reference in New Issue
Block a user