Browse Source

fix missing grpc dial option

add-ec-vacuum
chrislu 4 months ago
parent
commit
f03f4383af
  1. 7
      weed/worker/worker.go

7
weed/worker/worker.go

@ -14,6 +14,7 @@ import (
"github.com/seaweedfs/seaweedfs/weed/pb/worker_pb"
"github.com/seaweedfs/seaweedfs/weed/worker/tasks"
"github.com/seaweedfs/seaweedfs/weed/worker/types"
"google.golang.org/grpc"
// Import task packages to trigger their auto-registration
_ "github.com/seaweedfs/seaweedfs/weed/worker/tasks/ec_vacuum"
@ -446,6 +447,12 @@ func (w *Worker) executeTask(task *types.TaskInput) {
return
}
// Pass worker's gRPC dial option to task if it supports it
if grpcTask, ok := taskInstance.(interface{ SetGrpcDialOption(grpc.DialOption) }); ok {
grpcTask.SetGrpcDialOption(w.config.GrpcDialOption)
glog.V(2).Infof("Set gRPC dial option for task %s", task.ID)
}
// Task execution uses the new unified Task interface
glog.V(2).Infof("Executing task %s in working directory: %s", task.ID, taskWorkingDir)

Loading…
Cancel
Save