Commit 8d9cb73f authored by vicotor's avatar vicotor

fix bug

parent 1f48d68a
...@@ -369,8 +369,10 @@ func (wm *WorkerManager) manageWorker(worker *Worker) error { ...@@ -369,8 +369,10 @@ func (wm *WorkerManager) manageWorker(worker *Worker) error {
if err == nil { if err == nil {
// add task to cache. // add task to cache.
worker.recentTask.Add(task.TaskId, task) worker.recentTask.Add(task.TaskId, task)
if e := wm.setWorkerLastTaskTime(worker, time.Now().Unix()); e != nil { if task.TaskKind == odysseus.TaskKind_ComputeTask {
log.WithField("worker", worker.uuid).WithError(e).Error("set worker last task time failed") if e := wm.setWorkerLastTaskTime(worker, time.Now().Unix()); e != nil {
log.WithField("worker", worker.uuid).WithError(e).Error("set worker last task time failed")
}
} }
} }
log.WithField("worker", worker.uuid).Info("dispatch task to worker") log.WithField("worker", worker.uuid).Info("dispatch task to worker")
......
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