Switch to SQLite for activity tracking
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/pterodactyl/wings/internal/cron"
|
||||
"github.com/pterodactyl/wings/internal/sqlite"
|
||||
log2 "log"
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
@@ -131,6 +132,10 @@ func rootCmdRun(cmd *cobra.Command, _ []string) {
|
||||
}),
|
||||
)
|
||||
|
||||
if err := sqlite.Initialize(cmd.Context()); err != nil {
|
||||
log.WithField("error", err).Fatal("failed to initialize database")
|
||||
}
|
||||
|
||||
manager, err := server.NewManager(cmd.Context(), pclient)
|
||||
if err != nil {
|
||||
log.WithField("error", err).Fatal("failed to load server configurations")
|
||||
@@ -260,7 +265,7 @@ func rootCmdRun(cmd *cobra.Command, _ []string) {
|
||||
}
|
||||
}()
|
||||
|
||||
if s, err := cron.Scheduler(manager); err != nil {
|
||||
if s, err := cron.Scheduler(cmd.Context(), manager); err != nil {
|
||||
log.WithField("error", err).Fatal("failed to initialize cron system")
|
||||
} else {
|
||||
log.WithField("subsystem", "cron").Info("starting cron processes")
|
||||
|
||||
Reference in New Issue
Block a user