aboutsummaryrefslogtreecommitdiff
path: root/weed/server/master_server.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/server/master_server.go')
-rw-r--r--weed/server/master_server.go17
1 files changed, 4 insertions, 13 deletions
diff --git a/weed/server/master_server.go b/weed/server/master_server.go
index 2b47fda11..cbc0aa337 100644
--- a/weed/server/master_server.go
+++ b/weed/server/master_server.go
@@ -49,6 +49,7 @@ type MasterOption struct {
}
type MasterServer struct {
+ master_pb.UnimplementedSeaweedServer
option *MasterOption
guard *security.Guard
@@ -212,17 +213,7 @@ func (ms *MasterServer) startAdminScripts() {
v := util.GetViper()
adminScripts := v.GetString("master.maintenance.scripts")
if adminScripts == "" {
- adminScripts = `
- lock
- ec.encode -fullPercent=95 -quietFor=1h
- ec.rebuild -force
- ec.balance -force
- volume.deleteEmpty -quietFor=24h -force
- volume.balance -force
- volume.fix.replication
- s3.clean.uploads -timeAgo=24h
- unlock
- `
+ return
}
glog.V(0).Infof("adminScripts: %v", adminScripts)
@@ -260,8 +251,8 @@ func (ms *MasterServer) startAdminScripts() {
go func() {
commandEnv.MasterClient.WaitUntilConnected()
- c := time.Tick(time.Duration(sleepMinutes) * time.Minute)
- for range c {
+ for {
+ time.Sleep(time.Duration(sleepMinutes) * time.Minute)
if ms.Topo.IsLeader() {
for _, line := range scriptLines {
for _, c := range strings.Split(line, ";") {