MM-23093 Implement Server Setup telemetry - server configuration (#14374)
* added advanced first day diagnostics reporting * typo * config corrected * defaults * moved from config to system db table * missing file * added error handling * tests * typos Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
278c295869
Коммит
7800116429
@@ -265,6 +265,22 @@ func (a *App) ensureInstallationDate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *App) ensureFirstServerRunTimestamp() error {
|
||||
_, err := a.getFirstServerRunTimestamp()
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
err = a.Srv().Store.System().SaveOrUpdate(&model.System{
|
||||
Name: model.SYSTEM_FIRST_SERVER_RUN_TIMESTAMP_KEY,
|
||||
Value: strconv.FormatInt(utils.MillisFromTime(time.Now()), 10),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// AsymmetricSigningKey will return a private key that can be used for asymmetric signing.
|
||||
func (s *Server) AsymmetricSigningKey() *ecdsa.PrivateKey {
|
||||
return s.asymmetricSigningKey
|
||||
|
||||
Ссылка в новой задаче
Block a user