This commit is contained in:
Tomas Dvorak
2026-03-20 16:57:40 +01:00
parent e09633d2f0
commit 3ce2650952
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ func NewFACRService(baseURL string) *FACRService {
return &FACRService{
baseURL: strings.TrimSuffix(baseURL, "/"),
httpClient: &http.Client{
Timeout: 30 * time.Second,
Timeout: 15 * time.Minute, // FAČR API can be very slow
},
}
}
+2 -2
View File
@@ -356,7 +356,7 @@ func StartPrefetcher(baseURL string) {
log.Printf("[prefetch] failed to create cache dir: %v", err)
}
client := &http.Client{Timeout: 20 * time.Second}
client := &http.Client{Timeout: 15 * time.Minute} // FACR API can be very slow
// Feature toggles (env)
enableFastMatch := envBool("ENABLE_FAST_MATCH_PREFETCH", true)
@@ -504,7 +504,7 @@ func StartPrefetcher(baseURL string) {
// PrefetchOnce runs a single prefetch cycle immediately. Useful to trigger after setup.
func PrefetchOnce(baseURL string) {
baseURL = strings.TrimSuffix(baseURL, "/")
client := &http.Client{Timeout: 20 * time.Second}
client := &http.Client{Timeout: 15 * time.Minute} // FACR API can be very slow
doPrefetchCycleGuarded(client, baseURL)
}