mirror of
https://github.com/duanhf2012/origin.git
synced 2026-05-20 08:17:29 +08:00
优化蓝图执行器
This commit is contained in:
@@ -82,9 +82,14 @@ func (bm *Blueprint) Create(graphName string) int64 {
|
||||
if graphName == "" {
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
graphID := atomic.AddInt64(&bm.seedID, 1)
|
||||
bm.mapGraph[graphID] = bm.graphPool.Create(graphName, graphID)
|
||||
gr := bm.graphPool.Create(graphName, graphID)
|
||||
if gr == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
bm.mapGraph[graphID] = gr
|
||||
return graphID
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user