sleep between the gap of each execution

related to https://github.com/chrislusf/seaweedfs/issues/2476
This commit is contained in:
chrislu 2021-12-07 11:44:08 -08:00
parent 2ba08afed1
commit 40ee9b4d7b

View file

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