aboutsummaryrefslogtreecommitdiff
path: root/weed/worker/worker.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/worker/worker.go')
-rw-r--r--weed/worker/worker.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/weed/worker/worker.go b/weed/worker/worker.go
index e196ee22e..c1ddf8b34 100644
--- a/weed/worker/worker.go
+++ b/weed/worker/worker.go
@@ -16,9 +16,8 @@ import (
"github.com/seaweedfs/seaweedfs/weed/worker/types"
// Import task packages to trigger their auto-registration
- _ "github.com/seaweedfs/seaweedfs/weed/worker/tasks/balance"
+ _ "github.com/seaweedfs/seaweedfs/weed/worker/tasks/ec_vacuum"
_ "github.com/seaweedfs/seaweedfs/weed/worker/tasks/erasure_coding"
- _ "github.com/seaweedfs/seaweedfs/weed/worker/tasks/vacuum"
)
// Worker represents a maintenance worker instance
@@ -447,6 +446,18 @@ func (w *Worker) executeTask(task *types.TaskInput) {
return
}
+ // Pass worker's gRPC dial option to task if it supports it
+ if grpcTask, ok := taskInstance.(types.TaskWithGrpcDial); ok {
+ grpcTask.SetGrpcDialOption(w.config.GrpcDialOption)
+ glog.V(2).Infof("Set gRPC dial option for task %s", task.ID)
+ }
+
+ // Pass worker's admin server address to task if it supports it
+ if adminTask, ok := taskInstance.(types.TaskWithAdminAddress); ok {
+ adminTask.SetAdminAddress(w.config.AdminServer)
+ glog.V(2).Infof("Set admin server address 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)