Use helper func
This commit is contained in:
@@ -51,9 +51,7 @@ func (s *Server) StartEventListeners() {
|
|||||||
// 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))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|||||||
Reference in New Issue
Block a user