File tree Expand file tree Collapse file tree
fission-user-workers/service Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6161 HTTP_ENDPOINT = env .Must ("HTTP_ENDPOINT" )
6262 MAX_RETRIES = env .CouldInt ("MAX_RETRIES" , 3 )
6363 METRICS_ADDR = env .Could ("METRICS_ADDR" , ":2112" )
64+ HTTP_TIMEOUT = time .Duration (env .CouldInt ("HTTP_TIMEOUT" , 120 )) * time .Second
6465)
6566
6667func Run (cleanup cleanupper.Cleanupper ) error {
@@ -119,7 +120,7 @@ func setupMetrics(cleanup cleanupper.Cleanupper) error {
119120func buildProcessor (publish chan <- mq.PublishMessage ) mq.ProcessorFuncBuilder {
120121 return func () mq.ProcessorFunc {
121122 client := & http.Client {
122- Timeout : 10 * time . Second ,
123+ Timeout : HTTP_TIMEOUT ,
123124 }
124125 return func (incoming amqp091.Delivery ) error {
125126 opsReceived .Inc ()
Original file line number Diff line number Diff line change @@ -310,6 +310,10 @@ func (ctrl *KubernetesController) workerToMessageQueueTrigger(worker UserWorker)
310310 Name : "EXCHANGE" ,
311311 Value : ctrl .mqtExchange ,
312312 },
313+ {
314+ Name : "HTTP_TIMEOUT" ,
315+ Value : env .Could ("CTRL_K8S_MQT_HTTP_TIMEOUT" , "" ),
316+ },
313317 },
314318 },
315319 },
You can’t perform that action at this time.
0 commit comments