diff options
Diffstat (limited to 'weed/worker/tasks/vacuum/detection.go')
| -rw-r--r-- | weed/worker/tasks/vacuum/detection.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/worker/tasks/vacuum/detection.go b/weed/worker/tasks/vacuum/detection.go index 23f82ad34..0c14bb956 100644 --- a/weed/worker/tasks/vacuum/detection.go +++ b/weed/worker/tasks/vacuum/detection.go @@ -1,6 +1,7 @@ package vacuum import ( + "fmt" "time" "github.com/seaweedfs/seaweedfs/weed/glog" @@ -31,7 +32,11 @@ func Detection(metrics []*types.VolumeHealthMetrics, clusterInfo *types.ClusterI priority = types.TaskPriorityHigh } + // Generate task ID for future ActiveTopology integration + taskID := fmt.Sprintf("vacuum_vol_%d_%d", metric.VolumeID, time.Now().Unix()) + result := &types.TaskDetectionResult{ + TaskID: taskID, // For future ActiveTopology integration TaskType: types.TaskTypeVacuum, VolumeID: metric.VolumeID, Server: metric.Server, @@ -96,6 +101,7 @@ func createVacuumTaskParams(task *types.TaskDetectionResult, metric *types.Volum // Create typed protobuf parameters return &worker_pb.TaskParams{ + TaskId: task.TaskID, // Link to ActiveTopology pending task (if integrated) VolumeId: task.VolumeID, Server: task.Server, Collection: task.Collection, |
