3
0

Add warnings about exprimental state and sqlite usage

This commit is contained in:
Denis Arh
2020-12-18 15:46:48 +01:00
parent cf9caa8c35
commit dc30fd4186
2 changed files with 23 additions and 0 deletions
+19
View File
@@ -53,6 +53,25 @@ func (app *CortezaApp) Setup() (err error) {
return nil
}
{
// Raise warnings about experimental parts that are enabled
log := app.Log.WithOptions(zap.AddStacktrace(zap.PanicLevel), zap.WithCaller(false))
if app.Opt.Federation.Enabled {
log.Warn("Record Federation is still in EXPERIMENTAL phase")
}
if app.Opt.SCIM.Enabled {
log.Warn("Support for SCIM protocol is still in EXPERIMENTAL phase")
}
if app.Opt.DB.IsSQLite() {
log.Warn("You're using SQLite as a storage backend")
log.Warn("Should be used only for testing")
log.Warn("You may experience unstability and data loss")
}
}
hcd := healthcheck.Defaults()
hcd.Add(scheduler.Healthcheck, "Scheduler")
hcd.Add(mail.Healthcheck, "Mail")
+4
View File
@@ -10,3 +10,7 @@ func (o *DBOpt) Defaults() {
o.DSN = "mysql://" + o.DSN
}
}
func (o DBOpt) IsSQLite() bool {
return strings.HasPrefix(o.DSN, "sqlite3")
}