mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-15 18:56:59 +00:00
more tests
This commit is contained in:
parent
0bb7de5739
commit
c5685b4ea1
3 changed files with 4 additions and 8 deletions
|
@ -52,13 +52,13 @@ func (cp *ClientPool) GetClient(key string) *http.Client {
|
|||
return client
|
||||
}
|
||||
|
||||
client := cp.createClient(key)
|
||||
client := cp.createClient()
|
||||
cp.clients[key] = client
|
||||
return client
|
||||
}
|
||||
|
||||
// createClient creates a new HTTP client with optimized connection pooling
|
||||
func (cp *ClientPool) createClient(key string) *http.Client {
|
||||
func (cp *ClientPool) createClient() *http.Client {
|
||||
transport := &http.Transport{
|
||||
Proxy: proxy.Proxy(),
|
||||
DialContext: (&net.Dialer{
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
package driver
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"forgejo.org/modules/httplib"
|
||||
driver_options "forgejo.org/services/f3/driver/options"
|
||||
|
||||
|
@ -16,8 +14,6 @@ import (
|
|||
func newOptions() options.Interface {
|
||||
o := &driver_options.Options{}
|
||||
o.SetName(driver_options.Name)
|
||||
o.SetNewMigrationHTTPClient(func() *http.Client {
|
||||
return httplib.GetMigrationClient()
|
||||
})
|
||||
o.SetNewMigrationHTTPClient(httplib.GetMigrationClient)
|
||||
return o
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ package migrations
|
|||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
@ -14,6 +13,7 @@ import (
|
|||
"time"
|
||||
|
||||
"forgejo.org/modules/httplib"
|
||||
"forgejo.org/modules/json"
|
||||
"forgejo.org/modules/log"
|
||||
base "forgejo.org/modules/migration"
|
||||
"forgejo.org/modules/structs"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue