Browse Source

sleep between the gap of each execution

related to https://github.com/chrislusf/seaweedfs/issues/2476
pull/2500/head
chrislu 3 years ago
parent
commit
40ee9b4d7b
  1. 4
      weed/server/master_server.go

4
weed/server/master_server.go

@ -261,8 +261,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, ";") {

Loading…
Cancel
Save