From ce0c8e00256adbab53575bd4e917f17bf564118d Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Sun, 5 Mar 2023 17:05:01 +0100 Subject: [PATCH] Update SharingTime to 20 min as 15 is not enough --- repositories.go | 2 +- submissions.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repositories.go b/repositories.go index 855397e..d54063d 100644 --- a/repositories.go +++ b/repositories.go @@ -576,7 +576,7 @@ func TriggerTests(c *gin.Context, work *Work, repo *Repository, u *User) { Key: aws.String(filepath.Join(fmt.Sprintf("%d", work.Id), fmt.Sprintf("rendu-%s.tar.xz", login))), }) - url, err := req.Presign(SharingTime) + url, err := req.Presign(SharingTime * 20) if err != nil { log.Println("Unable to create presign URL:", err) c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"errmsg": "Something goes wrong when creating the presigned URL."}) diff --git a/submissions.go b/submissions.go index b5f0da1..8f7aa59 100644 --- a/submissions.go +++ b/submissions.go @@ -17,7 +17,7 @@ import ( "github.com/gin-gonic/gin" ) -const SharingTime = 15 * time.Minute +const SharingTime = 10 * time.Minute var ( s3_endpoint string