Use helper func
This commit is contained in:
parent
60212bb08e
commit
0fc1f300f8
|
@ -50,10 +50,8 @@ func (s *Server) StartEventListeners() {
|
||||||
// cause it to block until the first call is done calculating disk usage, which will
|
// cause it to block until the first call is done calculating disk usage, which will
|
||||||
// case stat events to pile up for the server.
|
// case stat events to pile up for the server.
|
||||||
s.Filesystem.HasSpaceAvailable()
|
s.Filesystem.HasSpaceAvailable()
|
||||||
|
|
||||||
// Emit the event to the websocket.
|
s.emitProcUsage()
|
||||||
b, _ := json.Marshal(s.Proc())
|
|
||||||
s.Events().Publish(StatsEvent, string(b))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user