mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-10-05 01:43:22 +08:00
Show cpu and memory stats of every node
This commit is contained in:
@@ -144,6 +144,13 @@ func LoadSessionsFromDisk() error {
|
||||
for _, s := range sessions {
|
||||
timeLeft := s.ExpiresAt.Sub(time.Now())
|
||||
CloseSessionAfter(s, timeLeft)
|
||||
|
||||
// start collecting stats for every instance
|
||||
for _, i := range s.Instances {
|
||||
// wire the session back to the instance
|
||||
i.session = s
|
||||
go i.CollectStats()
|
||||
}
|
||||
}
|
||||
}
|
||||
file.Close()
|
||||
|
Reference in New Issue
Block a user