mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-18 11:46:23 -07:00
Reset views on gochan startup
This commit is contained in:
parent
c7fa173d3a
commit
7a3130635a
5 changed files with 50 additions and 4 deletions
|
@ -77,6 +77,14 @@ func main() {
|
|||
gcutil.LogFatal().Err(err).Msg("Failed to initialize the database")
|
||||
}
|
||||
events.TriggerEvent("db-initialized")
|
||||
events.RegisterEvent([]string{"db-views-reset"}, func(trigger string, i ...interface{}) error {
|
||||
gcutil.LogInfo().Msg("SQL views reset")
|
||||
return nil
|
||||
})
|
||||
if err = gcsql.ResetViews(); err != nil {
|
||||
gcutil.LogFatal().Err(err).Send()
|
||||
}
|
||||
|
||||
parseCommandLine()
|
||||
serverutil.InitMinifier()
|
||||
siteCfg := config.GetSiteConfig()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue