- Add more limit to number of gorutines

- Add gorutine stats to logs
- Fix issues with repair
This commit is contained in:
Mukhtar Akere
2025-03-27 08:24:40 +01:00
parent 7bd38736b1
commit d49fbea60f
11 changed files with 163 additions and 139 deletions
+11 -3
View File
@@ -12,10 +12,18 @@ import (
var sharedClient = &http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
Proxy: http.ProxyFromEnvironment,
MaxIdleConns: 100,
MaxIdleConnsPerHost: 20,
MaxConnsPerHost: 50,
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ResponseHeaderTimeout: 30 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
DisableKeepAlives: false,
},
Timeout: 0,
Timeout: 60 * time.Second,
}
type File struct {
+1 -2
View File
@@ -4,7 +4,6 @@ import (
"context"
"fmt"
"github.com/go-chi/chi/v5"
"github.com/sirrobot01/debrid-blackhole/internal/logger"
"github.com/sirrobot01/debrid-blackhole/pkg/service"
"html/template"
"net/http"
@@ -23,7 +22,7 @@ func New() *WebDav {
ready: make(chan struct{}),
}
for name, c := range svc.Debrid.Caches {
h := NewHandler(name, c, logger.NewLogger(fmt.Sprintf("%s-webdav", name)))
h := NewHandler(name, c, c.GetLogger())
w.Handlers = append(w.Handlers, h)
}
return w