Skip to content

Commit 7ab51db

Browse files
committed
Added 5 sec delay in polling loop of upload status and SAST status api's
1 parent 785707f commit 7ab51db

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

appknox/upload.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ func (s *UploadService) CheckSubmission(ctx context.Context, submissionID int) (
105105
return nil, nil, errors.New("Request timed out")
106106
}
107107
fileID = submission.File
108+
if fileID == 0 {
109+
time.Sleep(5 * time.Second)
110+
}
108111
}
109112
file, resp, err := s.client.Files.GetByID(ctx, fileID)
110113
if err != nil {

helper/cicheck.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ func ProcessCiCheck(fileID, riskThreshold int, staticScanTimeout time.Duration)
6060
PrintError(err)
6161
os.Exit(1)
6262
}
63+
time.Sleep(5 * time.Second)
6364
}
6465

6566
_, analysisResponse, err := client.Analyses.ListByFile(ctx, fileID, nil)

0 commit comments

Comments
 (0)