...
|
...
|
@@ -2,6 +2,7 @@ package service |
|
|
|
|
|
import (
|
|
|
"fmt"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/xredis"
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
"time"
|
...
|
...
|
@@ -501,6 +502,15 @@ func (rs *EvaluationProjectService) List(in *command.QueryProjectCommand) (inter |
|
|
}
|
|
|
|
|
|
func (rs *EvaluationProjectService) Activate(in *command.ActivateProjectCommand) (interface{}, error) {
|
|
|
lock := xredis.NewLockProjectId(int(in.Id))
|
|
|
err := lock.Lock()
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
defer func() {
|
|
|
lock.UnLock()
|
|
|
}()
|
|
|
|
|
|
transactionContext, err := factory.ValidateStartTransaction(in)
|
|
|
if err != nil {
|
|
|
return nil, err
|
...
|
...
|
|