- change freshfood retry count to 1, timeout to 20s.
This commit is contained in:
@@ -92,7 +92,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
retryCount = 2
|
retryCount = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
type API struct {
|
type API struct {
|
||||||
@@ -113,7 +113,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func New(baseURL string) *API {
|
func New(baseURL string) *API {
|
||||||
return &API{baseURL, &http.Client{Timeout: time.Second * 5}}
|
return &API{baseURL, &http.Client{Timeout: time.Second * 20}}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *API) AccessFreshFood(apiStr string, params url.Values) error {
|
func (f *API) AccessFreshFood(apiStr string, params url.Values) error {
|
||||||
|
|||||||
Reference in New Issue
Block a user