|
@@ -437,7 +437,16 @@ func transactionHandler(ctx context.Context, action string) (err *errs.Error) {
|
|
case "commit":
|
|
case "commit":
|
|
operation = func() error { return contextSession.CommitTransaction(contextSession) }
|
|
operation = func() error { return contextSession.CommitTransaction(contextSession) }
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ defer func () {
|
|
|
|
+ if localErr != nil {
|
|
|
|
+ err = errs.Internal().Details(&errs.Detail{
|
|
|
|
+ Message: localErr.Error(),
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }()
|
|
try := 4
|
|
try := 4
|
|
|
|
+
|
|
for {
|
|
for {
|
|
if localErr = operation(); localErr == nil {
|
|
if localErr = operation(); localErr == nil {
|
|
fmt.Println(action, "executed ")
|
|
fmt.Println(action, "executed ")
|
|
@@ -459,13 +468,6 @@ func transactionHandler(ctx context.Context, action string) (err *errs.Error) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- if localErr != nil {
|
|
|
|
- err = errs.Internal().Details(&errs.Detail{
|
|
|
|
- Message: localErr.Error(),
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- return
|
|
|
|
}
|
|
}
|
|
|
|
|
|
func ReadJson(ctx context.Context, entity interface{}) (err *errs.Error) {
|
|
func ReadJson(ctx context.Context, entity interface{}) (err *errs.Error) {
|