added sleep

This commit is contained in:
Matthew R. Kasun 2022-02-04 13:11:11 -05:00
parent f0037fb880
commit 02b7025b28

View file

@ -3,8 +3,10 @@ package controller
import (
"encoding/json"
"errors"
"fmt"
"net/http"
"strings"
"time"
"github.com/gorilla/mux"
"github.com/gravitl/netmaker/database"
@ -104,7 +106,9 @@ func keyUpdate(w http.ResponseWriter, r *http.Request) {
return
}
for _, node := range nodes {
fmt.Println("updating node ", node.Name, " for a key update")
runUpdates(&node, true)
time.Sleep(time.Second << 10)
}
}