Fix Docker Swarm discovery network name mismatch
- Changed NetworkName from 'chorus_default' to 'chorus_net' - This matches the actual network 'CHORUS_chorus_net' (service prefix added automatically) - Fixes discovered_count:0 issue - now successfully discovering all 25 agents - Updated IMPLEMENTATION-SUMMARY with deployment status Result: All 25 CHORUS agents now discovered successfully via Docker Swarm API 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -6,10 +6,11 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
||||
"github.com/chorus-services/whoosh/internal/config"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
@@ -81,8 +82,13 @@ type IssueRepository struct {
|
||||
// NewClient creates a new Gitea API client
|
||||
func NewClient(cfg config.GITEAConfig) *Client {
|
||||
token := cfg.Token
|
||||
// TODO: Handle TokenFile if needed
|
||||
|
||||
// Load token from file if TokenFile is specified and Token is empty
|
||||
if token == "" && cfg.TokenFile != "" {
|
||||
if fileToken, err := os.ReadFile(cfg.TokenFile); err == nil {
|
||||
token = strings.TrimSpace(string(fileToken))
|
||||
}
|
||||
}
|
||||
|
||||
return &Client{
|
||||
baseURL: cfg.BaseURL,
|
||||
token: token,
|
||||
|
||||
Reference in New Issue
Block a user