修复DataMap无法在多个节点之间共享的问题

This commit is contained in:
GoEdgeLab
2023-03-19 10:26:05 +08:00
parent a4b432401a
commit 6d5a30e882
3 changed files with 36 additions and 2 deletions

View File

@@ -967,6 +967,11 @@ func (this *NodeDAO) ComposeNodeConfig(tx *dbs.Tx, nodeId int64, dataMap *shared
cacheMap = utils.NewCacheMap()
}
// 放入到缓存中,以便于后面继续使用
if dataMap != nil {
cacheMap.Put("DataMap", dataMap)
}
node, err := this.FindEnabledNode(tx, nodeId)
if err != nil {
return nil, err