Introduce method "Environment" to the Runners interface.
This way we can relate to which environment a runner belongs.
This commit is contained in:
@@ -64,10 +64,14 @@ func (n *AbstractManager) EnvironmentStatistics() map[dto.EnvironmentID]*dto.Sta
|
||||
ID: int(e.ID()),
|
||||
PrewarmingPoolSize: e.PrewarmingPoolSize(),
|
||||
IdleRunners: uint(e.IdleRunnerCount()),
|
||||
UsedRunners: 0, // Adjusted later as the information is present in the specific runner manager.
|
||||
UsedRunners: 0, // Increased below.
|
||||
}
|
||||
}
|
||||
|
||||
for _, r := range n.usedRunners.List() {
|
||||
environments[r.Environment()].UsedRunners++
|
||||
}
|
||||
|
||||
return environments
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user