return idle status when worker has nothing to do

This commit is contained in:
Murat Kabilov
2017-10-11 15:42:20 +02:00
committed by GitHub
parent 793defef72
commit 8d5faaa5a5
4 changed files with 18 additions and 7 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ func (c *Controller) GetWorkersCnt() uint32 {
func (c *Controller) WorkerStatus(workerID uint32) (*spec.WorkerStatus, error) {
obj, ok := c.curWorkerCluster.Load(workerID)
if !ok || obj == nil {
return nil, fmt.Errorf("worker has no status")
return nil, nil
}
cl, ok := obj.(*cluster.Cluster)