Skip to content

Commit bb53280

Browse files
committed
enhance(upstream): proxy target parsing from multiple configs
1 parent 44246c9 commit bb53280

File tree

4 files changed

+518
-38
lines changed

4 files changed

+518
-38
lines changed

internal/cron/upstream_availability.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package cron
33
import (
44
"time"
55

6-
apiUpstream "github.com/0xJacky/Nginx-UI/api/upstream"
76
"github.com/0xJacky/Nginx-UI/internal/upstream"
87
"github.com/go-co-op/gocron/v2"
98
"github.com/uozi-tech/cosy/logger"
@@ -41,13 +40,6 @@ func executeUpstreamAvailabilityTest() {
4140
return
4241
}
4342

44-
// Check if we should skip this test due to active WebSocket connections
45-
// (WebSocket connections trigger more frequent checks)
46-
if hasActiveWebSocketConnections() {
47-
logger.Debug("Skipping scheduled test due to active WebSocket connections")
48-
return
49-
}
50-
5143
start := time.Now()
5244
logger.Debug("Starting scheduled upstream availability test for", targetCount, "targets")
5345

@@ -57,11 +49,6 @@ func executeUpstreamAvailabilityTest() {
5749
logger.Debug("Upstream availability test completed in", duration)
5850
}
5951

60-
// hasActiveWebSocketConnections checks if there are active WebSocket connections
61-
func hasActiveWebSocketConnections() bool {
62-
return apiUpstream.HasActiveWebSocketConnections()
63-
}
64-
6552
// RestartUpstreamAvailabilityJob restarts the upstream availability job
6653
func RestartUpstreamAvailabilityJob() error {
6754
logger.Info("Restarting upstream availability job...")

0 commit comments

Comments
 (0)