Skip to content

Commit

Permalink
updated stageTime-server 24.0220.1529 for tag version v0.4.57
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-hermann-sva committed Feb 20, 2024
1 parent 23865e3 commit 08c457d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
12 changes: 4 additions & 8 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ func (s StatusService) GetStatus(ctx context.Context, gRPCRequest *revisionrun.S

func (s Server) CreateRevisionRun(ctx context.Context, gRPCRequest *revisionrun.CreateRevisionRunRequest) (*revisionrun.Response, error) {

prInformation := make(map[string]string)

// CREATE REDIS CLIENT / JSON HANDLER
redisJSONHandler.SetGoRedisClient(redisClient)

Expand Down Expand Up @@ -156,12 +154,15 @@ func (s Server) CreateRevisionRun(ctx context.Context, gRPCRequest *revisionrun.

// LOOP OVER REVISIONRUN
stages := make(map[string]int)
stageNumber := 0
for i := 0; i < (len(renderedPipelineruns)); i++ {

countPipelineRuns = 0

for _, pr := range renderedPipelineruns[i] {

prInformation := make(map[string]string)

prValid, prInformation := internal.ValidateStorePipelineRuns(pr)

if !prValid {
Expand Down Expand Up @@ -207,12 +208,7 @@ func (s Server) CreateRevisionRun(ctx context.Context, gRPCRequest *revisionrun.

}

countStage := sthingsBase.ConvertStringToInteger(prInformation["stage"]) + 1

// CHECK IF REVISIONRUN ALREADY EXISTS
revisionRunFromRedis := server.GetRevisionRunFromRedis(redisJSONHandler, revisionRunID+"-status", true)
fmt.Println(revisionRunFromRedis)
fmt.Println("EXISTS ALREADY")
countStage := stageNumber + 1

// CREATE REVISIONRUN STATUS ON REDIS + PRINT AS TABLE
initialRrs := server.RevisionRunStatus{
Expand Down
1 change: 1 addition & 0 deletions server/producing.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func GetRevisionRunFromRedis(redisJSONHandler *rejson.Handler, revisionRunStatus
revisionRunStatus, jsonExists := sthingsCli.GetRedisJSON(redisJSONHandler, revisionRunStatusID)

if jsonExists {

err := json.Unmarshal(revisionRunStatus, &revisionRunFromRedis)
if err != nil {
log.Fatalf("FAILED TO JSON UNMARSHAL REVISIONRUN STATUS")
Expand Down

0 comments on commit 08c457d

Please sign in to comment.