[ARVADOS] updated: e997c2308b00ba1864f13c506c6a8e86e01c83d8

Git user git at public.curoverse.com
Mon Nov 7 15:10:18 EST 2016


Summary of changes:
 services/keepstore/s3_volume.go | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

       via  e997c2308b00ba1864f13c506c6a8e86e01c83d8 (commit)
      from  39536d8dd7f0a6ab89e106cd065830f1cbb067b1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit e997c2308b00ba1864f13c506c6a8e86e01c83d8
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Nov 7 15:10:11 2016 -0500

    10468: Use consts for defaults.

diff --git a/services/keepstore/s3_volume.go b/services/keepstore/s3_volume.go
index a0cf450..7f94f28 100644
--- a/services/keepstore/s3_volume.go
+++ b/services/keepstore/s3_volume.go
@@ -19,6 +19,11 @@ import (
 	"github.com/AdRoll/goamz/s3"
 )
 
+const (
+	s3DefaultReadTimeout = arvados.Duration(10 * time.Minute)
+	s3DefaultConnectTimeout = arvados.Duration(time.Minute)
+)
+
 var (
 	// ErrS3TrashDisabled is returned by Trash if that operation
 	// is impossible with the current config.
@@ -213,10 +218,10 @@ func (v *S3Volume) Start() error {
 	// Zero timeouts mean "wait forever", which is a bad
 	// default. Default to long timeouts instead.
 	if v.ConnectTimeout == 0 {
-		v.ConnectTimeout = arvados.Duration(time.Minute)
+		v.ConnectTimeout = s3DefaultConnectTimeout
 	}
 	if v.ReadTimeout == 0 {
-		v.ReadTimeout = arvados.Duration(10 * time.Minute)
+		v.ReadTimeout = s3DefaultReadTimeout
 	}
 
 	client := s3.New(auth, region)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list