Increase request timeout, default 30 seconds are not enough to download some repos

main
Max Ignatenko 2024-02-16 16:47:36 +00:00
parent 4626b8b9ca
commit 04d521f58c
1 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import (
"gorm.io/gorm/clause" "gorm.io/gorm/clause"
comatproto "github.com/bluesky-social/indigo/api/atproto" comatproto "github.com/bluesky-social/indigo/api/atproto"
"github.com/bluesky-social/indigo/util"
"github.com/bluesky-social/indigo/xrpc" "github.com/bluesky-social/indigo/xrpc"
"github.com/uabluerail/bsky-tools/xrpcauth" "github.com/uabluerail/bsky-tools/xrpcauth"
@ -158,6 +159,8 @@ func (p *WorkerPool) doWork(ctx context.Context, work WorkItem) error {
client := xrpcauth.NewAnonymousClient(ctx) client := xrpcauth.NewAnonymousClient(ctx)
client.Host = u.String() client.Host = u.String()
client.Client = util.RobustHTTPClient()
client.Client.Timeout = 30 * time.Minute
retry: retry:
if p.limiter != nil { if p.limiter != nil {