mirror of
https://github.com/sartoopjj/thefeed.git
synced 2026-05-18 06:34:36 +03:00
fix: increase timeout values for resolver and web server
This commit is contained in:
@@ -25,7 +25,7 @@ type ResolverChecker struct {
|
||||
// timeout is the per-probe deadline; 0 uses a 5-second default.
|
||||
func NewResolverChecker(fetcher *Fetcher, timeout time.Duration) *ResolverChecker {
|
||||
if timeout <= 0 {
|
||||
timeout = 5 * time.Second
|
||||
timeout = 10 * time.Second
|
||||
}
|
||||
return &ResolverChecker{
|
||||
fetcher: fetcher,
|
||||
|
||||
@@ -80,7 +80,7 @@ func NewTelegramReader(cfg TelegramConfig, channelUsernames []string, feed *Feed
|
||||
channels: cleaned,
|
||||
feed: feed,
|
||||
cache: make(map[string]cachedMessages),
|
||||
cacheTTL: 5 * time.Minute,
|
||||
cacheTTL: 30 * time.Minute,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -346,7 +346,7 @@ func (s *Server) initFetcher() error {
|
||||
fetcher.SetRateLimit(cfg.RateLimit)
|
||||
}
|
||||
|
||||
timeout := 5 * time.Second
|
||||
timeout := 20 * time.Second
|
||||
if cfg.Timeout > 0 {
|
||||
timeout = time.Duration(cfg.Timeout * float64(time.Second))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user