summaryrefslogtreecommitdiff
path: root/internal/api
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api')
-rw-r--r--internal/api/http.go5
-rw-r--r--internal/api/trello.go3
2 files changed, 5 insertions, 3 deletions
diff --git a/internal/api/http.go b/internal/api/http.go
index df28c65..d9ddf0e 100644
--- a/internal/api/http.go
+++ b/internal/api/http.go
@@ -7,7 +7,8 @@ import (
"fmt"
"io"
"net/http"
- "time"
+
+ "task-dashboard/internal/config"
)
// BaseClient provides common HTTP functionality for API clients
@@ -19,7 +20,7 @@ type BaseClient struct {
// NewBaseClient creates a new BaseClient with default settings
func NewBaseClient(baseURL string) BaseClient {
return BaseClient{
- HTTPClient: &http.Client{Timeout: 15 * time.Second},
+ HTTPClient: &http.Client{Timeout: config.HTTPClientTimeout},
BaseURL: baseURL,
}
}
diff --git a/internal/api/trello.go b/internal/api/trello.go
index 67ffad0..a276726 100644
--- a/internal/api/trello.go
+++ b/internal/api/trello.go
@@ -9,6 +9,7 @@ import (
"sync"
"time"
+ "task-dashboard/internal/config"
"task-dashboard/internal/models"
)
@@ -170,7 +171,7 @@ func (c *TrelloClient) GetBoardsWithCards(ctx context.Context) ([]models.Board,
var wg sync.WaitGroup
var mu sync.Mutex // Protects writes to boards slice elements
- sem := make(chan struct{}, 5) // Limit to 5 concurrent requests
+ sem := make(chan struct{}, config.MaxConcurrentTrelloRequests)
for i := range boards {
wg.Add(1)