storagenode: add custom dial timeout for orders sending (#2939)

This commit is contained in:
Michal Niewrzal 2019-09-03 17:32:28 +02:00 committed by GitHub
parent 4d65fdaea5
commit ee614bf032
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -82,6 +82,7 @@ type DB interface {
type Config struct {
SenderInterval time.Duration `help:"duration between sending" default:"1h0m0s"`
SenderTimeout time.Duration `help:"timeout for sending" default:"1h0m0s"`
SenderDialTimeout time.Duration `help:"timeout for dialing satellite during sending orders" default:"1m0s"`
SenderRequestTimeout time.Duration `help:"timeout for read/write operations during sending" default:"1h0m0s"`
CleanupInterval time.Duration `help:"duration between archive cleanups" default:"24h0m0s"`
ArchiveTTL time.Duration `help:"length of time to archive orders before deletion" default:"168h0m0s"` // 7 days

View File

@ -298,6 +298,7 @@ func New(log *zap.Logger, full *identity.FullIdentity, db DB, revocationDB exten
// TODO workaround for custom timeout for order sending request (read/write)
ordersTransport := transport.NewClientWithTimeouts(options, transport.Timeouts{
Dial: config.Storage2.Orders.SenderDialTimeout,
Request: config.Storage2.Orders.SenderRequestTimeout,
})