fix bug in should-finish instruction
This commit is contained in:
parent
195740fa3d
commit
b4ad1e0e96
15
taskman.go
15
taskman.go
@ -30,15 +30,14 @@ func newTaskMan(delay int, callUrl string) *TaskMan {
|
|||||||
go func() {
|
go func() {
|
||||||
for {
|
for {
|
||||||
<-t.waitChan
|
<-t.waitChan
|
||||||
if len(t.waitQueue) < 1 {
|
if len(t.waitQueue) >= 1 {
|
||||||
return
|
cf := t.waitQueue[len(t.waitQueue)-1]
|
||||||
|
if len(t.waitQueue) > 1 {
|
||||||
|
logInfo("redundant tasks dropped:", len(t.waitQueue)-1)
|
||||||
|
}
|
||||||
|
t.waitQueue = []*changedFile{}
|
||||||
|
go t.preRun(cf)
|
||||||
}
|
}
|
||||||
cf := t.waitQueue[len(t.waitQueue)-1]
|
|
||||||
if len(t.waitQueue) > 1 {
|
|
||||||
logInfo("redundant tasks dropped:", len(t.waitQueue)-1)
|
|
||||||
}
|
|
||||||
t.waitQueue = []*changedFile{}
|
|
||||||
go t.preRun(cf)
|
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user