Skip to content

Commit

Permalink
chore: Reduce timeout to 60s
Browse files Browse the repository at this point in the history
  • Loading branch information
zsolt-marta-bitrise committed Dec 12, 2024
1 parent 2ea0886 commit ba3a397
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/build_cache/kv/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (c *Client) DownloadFile(ctx context.Context, filePath, key string, fileMod
}

func (c *Client) DownloadStream(ctx context.Context, destination io.Writer, key string) error {
timeoutCtx, cancel := context.WithTimeout(ctx, 2*time.Minute)
timeoutCtx, cancel := context.WithTimeout(ctx, 60*time.Second)
defer cancel()

kvReader, err := c.InitiateGet(timeoutCtx, key)
Expand Down
2 changes: 1 addition & 1 deletion internal/build_cache/kv/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (c *Client) uploadFile(ctx context.Context, filePath, key, checksum string)
}

func (c *Client) uploadStream(ctx context.Context, source io.Reader, key, checksum string, size int64) error {
timeoutCtx, cancel := context.WithTimeout(ctx, 2*time.Minute)
timeoutCtx, cancel := context.WithTimeout(ctx, 60*time.Second)
defer cancel()

kvWriter, err := c.InitiatePut(timeoutCtx, PutParams{
Expand Down

0 comments on commit ba3a397

Please sign in to comment.