1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-07-01 14:51:09 +02:00

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() { go func() {
commandEnv.MasterClient.WaitUntilConnected() commandEnv.MasterClient.WaitUntilConnected()
c := time.Tick(time.Duration(sleepMinutes) * time.Minute) for {
for range c { time.Sleep(time.Duration(sleepMinutes) * time.Minute)
if ms.Topo.IsLeader() { if ms.Topo.IsLeader() {
for _, line := range scriptLines { for _, line := range scriptLines {
for _, c := range strings.Split(line, ";") { for _, c := range strings.Split(line, ";") {