Skip to content

Commit

Permalink
fix: correct worker count for services
Browse files Browse the repository at this point in the history
  • Loading branch information
tjholm committed Nov 21, 2024
1 parent c610c92 commit 4189dbd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pkg/collector/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,15 @@ func (s *ServiceRequirements) HasDatabases() bool {
func (s *ServiceRequirements) WorkerCount() int {
workerCount := len(lo.Values(s.routes)) +
len(s.listeners) +
len(s.schedules) +
len(lo.Values(s.subscriptions)) +
len(lo.Values(s.websockets))
len(s.schedules)

for _, sub := range s.subscriptions {
workerCount += len(sub)
}

for _, ws := range s.websockets {
workerCount += len(ws)
}

if s.proxy != nil {
workerCount++
Expand Down

0 comments on commit 4189dbd

Please sign in to comment.