Skip to content

Commit

Permalink
Merge branch 'main' into fix-memory-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
aphralG committed Sep 27, 2023
2 parents 53232e7 + 394a3fe commit 297d95d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 30 deletions.
10 changes: 0 additions & 10 deletions src/core/nginx.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,25 +123,15 @@ func (n *NginxBinaryType) UpdateNginxDetailsFromProcesses(nginxProcesses []*Proc
n.statusUrls = map[string]string{}
n.statusUrlMutex.Unlock()

numberOfMasterProcesses := 0

for _, process := range nginxProcesses {
nginxDetails := n.GetNginxDetailsFromProcess(process)
if process.IsMaster {
numberOfMasterProcesses++
n.nginxDetailsMap[nginxDetails.GetNginxId()] = nginxDetails
} else {
n.nginxWorkersMap[nginxDetails.GetNginxId()] = append(n.nginxWorkersMap[nginxDetails.GetNginxId()], nginxDetails)
}
}

if len(n.nginxDetailsMap) != numberOfMasterProcesses {
log.Errorf(
"Multiple NGINX master processes detected with the same NGINX ID. Number of master processes is %d. Number of unique NGINX IDs is %d.",
numberOfMasterProcesses,
len(n.nginxDetailsMap),
)
}
}

func (n *NginxBinaryType) GetChildProcesses() map[string][]*proto.NginxDetails {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 297d95d

Please sign in to comment.