优化缓存任务Key状态增加执行中状态

This commit is contained in:
GoEdgeLab
2022-06-15 15:18:18 +08:00
parent 4be7f126f0
commit 6ce7119c14
2 changed files with 21 additions and 0 deletions

View File

@@ -306,12 +306,14 @@ func (this *HTTPCacheTaskService) FindEnabledHTTPCacheTask(ctx context.Context,
}
var pbKeys = []*pb.HTTPCacheTaskKey{}
for _, key := range keys {
pbKeys = append(pbKeys, &pb.HTTPCacheTaskKey{
Id: int64(key.Id),
TaskId: int64(key.TaskId),
Key: key.Key,
KeyType: key.KeyType,
IsDone: key.IsDone,
IsDoing: !key.IsDone && len(key.DecodeNodes()) > 0,
ErrorsJSON: key.Errors,
})
}