Start working loop first
This commit is contained in:
parent
ab0fc4a6a5
commit
aa9b5e9598
@ -190,13 +190,13 @@ func (worker *Worker) Work() {
|
|||||||
v.Close()
|
v.Close()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
for funcname, f := range worker.funcs {
|
|
||||||
worker.addFunc(funcname, f.timeout)
|
|
||||||
}
|
|
||||||
worker.running = true
|
worker.running = true
|
||||||
for _, v := range worker.agents {
|
for _, v := range worker.agents {
|
||||||
go v.Work()
|
go v.Work()
|
||||||
}
|
}
|
||||||
|
for funcname, f := range worker.funcs {
|
||||||
|
worker.addFunc(funcname, f.timeout)
|
||||||
|
}
|
||||||
ok := true
|
ok := true
|
||||||
for ok {
|
for ok {
|
||||||
var job *Job
|
var job *Job
|
||||||
|
Loading…
Reference in New Issue
Block a user