From c57a4a4c8bbb495b241aab412aeac095e0917451 Mon Sep 17 00:00:00 2001 From: Sai Date: Wed, 25 Sep 2024 12:53:55 +0800 Subject: [PATCH] add log --- internal/boltdb/local_apps.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/boltdb/local_apps.go b/internal/boltdb/local_apps.go index 259270c..641b552 100644 --- a/internal/boltdb/local_apps.go +++ b/internal/boltdb/local_apps.go @@ -181,6 +181,16 @@ func GetLocalAppInfoMap() (appMap map[string]*models.ApplicationInfo, err error) appMap = make(map[string]*models.ApplicationInfo) glog.Infof("Initializing GetLocalAppInfoMap") + if bdbClient == nil { + glog.Infof("bdbClient is nil") + return + } + + if bdbClient.bdb == nil { + glog.Infof("bdbClient.bdb is nil") + return + } + err = bdbClient.bdb.View(func(tx *bolt.Tx) error { bucket := tx.Bucket([]byte(LocalDevAppsBucketName)) if bucket == nil {