You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by li...@apache.org on 2022/10/31 01:45:20 UTC

[incubator-devlake] branch main updated: chore: increase the default value for API_TIMEOUT from 10s to 120s (#3581)

This is an automated email from the ASF dual-hosted git repository.

likyh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 6b0e7246 chore: increase the default value for API_TIMEOUT from 10s to 120s (#3581)
6b0e7246 is described below

commit 6b0e724612328ce24b8279b90b4768f4e34fa8f6
Author: Klesh Wong <zh...@merico.dev>
AuthorDate: Mon Oct 31 09:45:16 2022 +0800

    chore: increase the default value for API_TIMEOUT from 10s to 120s (#3581)
    
    * chore: increase the default value for API_TIMEOUT from 10s to 120s
    
    * fix: API_TIMEOUT in .env.example should be updated
---
 .env.example                       | 2 +-
 plugins/helper/api_async_client.go | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.env.example b/.env.example
index 911862b7..f143ea40 100644
--- a/.env.example
+++ b/.env.example
@@ -18,7 +18,7 @@ MODE=release
 NOTIFICATION_ENDPOINT=
 NOTIFICATION_SECRET=
 
-API_TIMEOUT=10s
+API_TIMEOUT=120s
 API_RETRY=3
 API_REQUESTS_PER_HOUR=10000
 PIPELINE_MAX_PARALLEL=1
diff --git a/plugins/helper/api_async_client.go b/plugins/helper/api_async_client.go
index fe87876c..a7cc7122 100644
--- a/plugins/helper/api_async_client.go
+++ b/plugins/helper/api_async_client.go
@@ -45,7 +45,7 @@ type ApiAsyncClient struct {
 	numOfWorkers int
 }
 
-const defaultTimeout = 10 * time.Second
+const defaultTimeout = 120 * time.Second
 
 // CreateAsyncApiClient creates a new ApiAsyncClient
 func CreateAsyncApiClient(