Browse Source

修改bug

yjp19871013@126.com 2 years ago
parent
commit
d62c9ebad3
1 changed files with 4 additions and 6 deletions
  1. 4 6
      saga/saga.go

+ 4 - 6
saga/saga.go

@@ -23,12 +23,10 @@ func Init(stateStoreName string, sagaName string) {
 		return
 	}
 
-	initOnce.Do(func() {
-		sagaInstance = new(Saga)
-		sagaInstance.stateStoreName = stateStoreName
-		sagaInstance.name = sagaName
-		sagaInstance.orchestrators = make([]*Orchestrator, 0)
-	})
+	sagaInstance = new(Saga)
+	sagaInstance.stateStoreName = stateStoreName
+	sagaInstance.name = sagaName
+	sagaInstance.orchestrators = make([]*Orchestrator, 0)
 }
 
 func Destroy() {