chore: 更新配置并优化任务错误处理
将数据库、Redis、Consul及Jaeger配置切换至新环境地址,并在worker中忽略"Invalid video_url"与"Invalid audio track"错误,同时补充模型调用成功日志。
This commit is contained in:
@@ -72,7 +72,9 @@ func (w *asyncWorker) handleOne(ctx context.Context, task *entity.ModelGatewayTa
|
||||
}
|
||||
|
||||
if !strings.Contains(err.Error(), "Timeout") &&
|
||||
!strings.Contains(err.Error(), "InternalServiceError") {
|
||||
!strings.Contains(err.Error(), "InternalServiceError") &&
|
||||
!strings.Contains(err.Error(), "Invalid video_url") &&
|
||||
!strings.Contains(err.Error(), "Invalid audio track") {
|
||||
w.failTask(ctx, task, startTime, err.Error())
|
||||
return
|
||||
}
|
||||
@@ -395,6 +397,7 @@ func InvokeModel(ctx context.Context, model *entity.ModelGatewayModel, body map[
|
||||
msg := string(b)
|
||||
return nil, fmt.Errorf("模型服务返回非2xx: %d, body=%s", resp.StatusCode, msg)
|
||||
}
|
||||
g.Log().Debugf(ctx, "[执行任务][模型调用成功] StatusCode=%v", resp.StatusCode)
|
||||
return b, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user