get all nodes on startup

This commit is contained in:
abhishek9686 2024-11-27 15:01:26 +04:00
parent cde56204fc
commit cbe660fbf2
2 changed files with 1 additions and 3 deletions

View file

@ -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
}

View file

@ -20,6 +20,7 @@ import (
// Run - runs all migrations
func Run() {
_, _ = logic.GetAllNodes()
updateEnrollmentKeys()
assignSuperAdmin()
createDefaultTagsAndPolicies()