mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-06 13:14:24 +08:00
get all nodes on startup
This commit is contained in:
parent
cde56204fc
commit
cbe660fbf2
2 changed files with 1 additions and 3 deletions
|
@ -445,9 +445,6 @@ func GetRecordKey(id string, network string) (string, error) {
|
|||
|
||||
func GetNodeByID(uuid string) (models.Node, error) {
|
||||
if servercfg.CacheEnabled() {
|
||||
if len(getNodesFromCache()) == 0 {
|
||||
_, _ = GetAllNodes()
|
||||
}
|
||||
if node, ok := getNodeFromCache(uuid); ok {
|
||||
return node, nil
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ import (
|
|||
|
||||
// Run - runs all migrations
|
||||
func Run() {
|
||||
_, _ = logic.GetAllNodes()
|
||||
updateEnrollmentKeys()
|
||||
assignSuperAdmin()
|
||||
createDefaultTagsAndPolicies()
|
||||
|
|
Loading…
Add table
Reference in a new issue