Commit 83831395 authored by vicotor's avatar vicotor

fix bug

parent 0ed6a1bd
......@@ -218,6 +218,7 @@ func (wm *WorkerManager) manageWorker(worker *Worker) error {
// add task to cache.
worker.recentTask.Add(task.TaskId, task)
}
log.WithField("worker", worker.uuid).Info("dispatch task to worker")
select {
case dtask.errCh <- err:
......@@ -262,6 +263,7 @@ func (wm *WorkerManager) manageWorker(worker *Worker) error {
// remove task from cache.
worker.recentTask.Remove(result.TaskId)
}
_ = wm.AddWorker(worker)
// todo: post event for task succeed or failed
return true
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment