mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-07 16:46:59 +00:00
fix missing grpc dial option
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user