fix(httpclient): replace DefaultClient with timed clients and retry
Пакет httpclient: timeout 45s, idle pool, DoWithRetry. Scheduler и nodecli используют retry; pipeline/asnresolve/jobs — httpclient.New вместо DefaultClient. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -7,13 +7,14 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"evobgp/internal/httpclient"
|
||||
"evobgp/internal/store"
|
||||
)
|
||||
|
||||
// PrefetchCDNSourceETags performs conditional GETs for CDN sources; on 200 parses CIDRs into module_prefix_snapshot.
|
||||
func PrefetchCDNSourceETags(ctx context.Context, st store.Backend, hc *http.Client) error {
|
||||
if hc == nil {
|
||||
hc = http.DefaultClient
|
||||
hc = httpclient.New(httpclient.DefaultTimeout)
|
||||
}
|
||||
tenants, err := st.ListTenantIDs()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user