@@ -17,7 +17,7 @@ import (
17
17
"go.uber.org/zap"
18
18
)
19
19
20
- const MAX_RETRIES = 5
20
+ const MAX_RETRIES = 3
21
21
const SLEEP_BETWEEN_RETRIES = 5
22
22
23
23
func NewHTTPRequest (method , url string , data []byte ) (* http.Request , context.Context , context.CancelFunc , error ) {
@@ -28,7 +28,7 @@ func NewHTTPRequest(method, url string, data []byte) (*http.Request, context.Con
28
28
req .Header .Set ("X-App-Client-ID" , node .Self .ID )
29
29
req .Header .Set ("X-App-Client-Key" , node .Self .PublicKey )
30
30
req .Header .Set ("X-App-Request-Hash" , requestHash )
31
- ctx , cncl := context .WithTimeout (context .Background (), time .Second * 60 )
31
+ ctx , cncl := context .WithTimeout (context .Background (), time .Second * 90 )
32
32
return req , ctx , cncl , err
33
33
}
34
34
@@ -79,7 +79,7 @@ func SendPostRequest(postURL string, data []byte, wg *sync.WaitGroup) (body []by
79
79
time .Sleep (SLEEP_BETWEEN_RETRIES * time .Second )
80
80
}
81
81
if resp == nil || err != nil {
82
- Logger .Error ("Failed after multiple retries" , zap .Any ("url" , u .String ()), zap .Int ("retried" , MAX_RETRIES ), zap .Error (err ))
82
+ Logger .Error ("Failed after multiple retries" , zap .Any ("url" , u .String ()), zap .Int ("retried" , MAX_RETRIES ), zap .Int ( "post_data_len" , len ( data )), zap . Error (err ))
83
83
return nil , err
84
84
}
85
85
if resp .Body == nil {
0 commit comments