return last running task info
This commit is contained in:
parent
9f60c4685f
commit
12d4a8eef0
|
@ -56,9 +56,7 @@ func (p *processor) handleReadyMajorTask(taskItem *task.Task) error {
|
|||
return nil
|
||||
}
|
||||
taskItem.RetryTimes++
|
||||
if taskItem.StartTimeInMillis == 0 {
|
||||
taskItem.StartTimeInMillis = time.Now().UnixMilli()
|
||||
}
|
||||
taskItem.StartTimeInMillis = time.Now().UnixMilli()
|
||||
taskItem.Status = task.StatusRunning
|
||||
taskItem.Metadata.Labels["total_diff_docs"] = 0
|
||||
taskItem.Metadata.Labels["only_in_source"] = 0
|
||||
|
|
|
@ -160,7 +160,11 @@ func (h *APIHandler) populateMajorTaskInfo(taskID string, sourceM util.MapStr) {
|
|||
sourceM.Put("metadata.labels.source_total_docs", ts.SourceDocs)
|
||||
}
|
||||
case "cluster_comparison":
|
||||
ts, _, err := h.getComparisonMajorTaskInfo(taskID)
|
||||
targetTaskId := taskID
|
||||
if repeatStatus.IsRepeat && repeatStatus.LastRunChildTaskID != "" {
|
||||
targetTaskId = repeatStatus.LastRunChildTaskID
|
||||
}
|
||||
ts, _, err := h.getComparisonMajorTaskInfo(targetTaskId)
|
||||
if err != nil {
|
||||
log.Warnf("fetch progress info of task error: %v", err)
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue