Commit 959238c4 authored by vicotor's avatar vicotor

fix bug

parent bdd02f5a
......@@ -45,6 +45,9 @@ func (p *poperV2) AddBack(w types.Worker) {
func (p *poperV2) PopWorker(ctx context.Context, rdb *redis.Client, task *odysseus.TaskContent, ex map[string]bool) (types.Worker, error) {
// 1. select from running model worker.
if ctx.Err() != nil {
return types.Worker{}, ErrTimeout
}
workers, err := p.workerRunningOperator.FindWorkerByModelId(ctx, int(task.TaskType), 10)
if err != nil {
log.WithField("tasktype", task.TaskType).WithError(err).Error("get running model worker failed")
......
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