Add internal logic to process activity events and send them to the panel

This commit is contained in:
DaneEveritt
2022-07-09 14:38:41 -04:00
parent 0380488cd2
commit 20e44bdc55
11 changed files with 131 additions and 11 deletions

View File

@@ -5,6 +5,7 @@ import (
"crypto/tls"
"errors"
"fmt"
"github.com/pterodactyl/wings/internal/cron"
log2 "log"
"net/http"
_ "net/http/pprof"
@@ -259,6 +260,13 @@ func rootCmdRun(cmd *cobra.Command, _ []string) {
}
}()
if s, err := cron.Scheduler(manager); err != nil {
log.WithField("error", err).Fatal("failed to initialize cron system")
} else {
log.WithField("subsystem", "cron").Info("starting cron processes")
s.StartAsync()
}
go func() {
// Run the SFTP server.
if err := sftp.New(manager).Run(); err != nil {