修复 错误
parent
7d2e8dd34d
commit
8828bcaed6
|
@ -47,7 +47,7 @@ func newTaskMan(delay int, callUrl string) *TaskMan {
|
||||||
|
|
||||||
func (t *TaskMan) Put(cf *changedFile) {
|
func (t *TaskMan) Put(cf *changedFile) {
|
||||||
if t.delay < 1 {
|
if t.delay < 1 {
|
||||||
t.preRun(cf)
|
t.dispatcher(cf)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
t.putLock.Lock()
|
t.putLock.Lock()
|
||||||
|
@ -58,6 +58,11 @@ func (t *TaskMan) Put(cf *changedFile) {
|
||||||
if t.lastTaskId > cf.Changed {
|
if t.lastTaskId > cf.Changed {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
t.dispatcher(cf)
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *TaskMan) dispatcher(cf *changedFile) {
|
||||||
if keyInInstruction(InstShouldFinish) {
|
if keyInInstruction(InstShouldFinish) {
|
||||||
t.waitQueue = append(t.waitQueue, cf)
|
t.waitQueue = append(t.waitQueue, cf)
|
||||||
if t.cmd == nil {
|
if t.cmd == nil {
|
||||||
|
@ -69,7 +74,6 @@ func (t *TaskMan) Put(cf *changedFile) {
|
||||||
} else {
|
} else {
|
||||||
t.preRun(cf)
|
t.preRun(cf)
|
||||||
}
|
}
|
||||||
}()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *TaskMan) preRun(cf *changedFile) {
|
func (t *TaskMan) preRun(cf *changedFile) {
|
||||||
|
|
Loading…
Reference in New Issue