// GlobalInit is for global configuration reload-able. func GlobalInit() { setting.NewConfigContext() log.Trace("Custom path: %s", setting.CustomPath) log.Trace("Log path: %s", setting.LogRootPath) mailer.NewMailerContext() models.LoadModelsConfig() NewServices() if setting.InstallLock { models.LoadRepoConfig() models.NewRepoContext() if err := models.NewEngine(); err != nil { log.Fatal(4, "Fail to initialize ORM engine: %v", err) } models.HasEngine = true cron.NewCronContext() log.NewGitLogger(path.Join(setting.LogRootPath, "http.log")) } if models.EnableSQLite3 { log.Info("SQLite3 Enabled") } checkRunMode() }
// globalInit is for global configuration reload-able. func globalInit() { base.NewConfigContext() mailer.NewMailerContext() models.LoadModelsConfig() models.LoadRepoConfig() models.NewRepoContext() models.NewEngine() }
// GlobalInit is for global configuration reload-able. func GlobalInit() { base.NewConfigContext() mailer.NewMailerContext() models.LoadModelsConfig() models.LoadRepoConfig() models.NewRepoContext() if base.InstallLock { if err := models.NewEngine(); err != nil { fmt.Println("%v", err) os.Exit(2) } models.HasEngine = true } base.NewServices() checkRunMode() }
// GlobalInit is for global configuration reload-able. func GlobalInit() { base.NewConfigContext() mailer.NewMailerContext() models.LoadModelsConfig() models.LoadRepoConfig() models.NewRepoContext() NewServices() if base.InstallLock { if err := models.NewEngine(); err != nil { qlog.Fatal(err) } models.HasEngine = true if models.EnableSQLite3 { log.Info("SQLite3 Enabled") } cron.NewCronContext() } checkRunMode() }
// GlobalInit is for global configuration reload-able. func GlobalInit() { setting.NewConfigContext() log.Trace("Custom path: %s", setting.CustomPath) log.Trace("Log path: %s", setting.LogRootPath) mailer.NewMailerContext() models.LoadModelsConfig() models.LoadRepoConfig() models.NewRepoContext() NewServices() if setting.InstallLock { if err := models.NewEngine(); err != nil { qlog.Fatal(err) } models.HasEngine = true cron.NewCronContext() } if models.EnableSQLite3 { log.Info("SQLite3 Enabled") } checkRunMode() }