Fix: buildable

This commit is contained in:
Grail Finder
2025-07-02 15:51:14 +03:00
parent 9973546aad
commit 3e0d24f5f8
7 changed files with 110 additions and 105 deletions

View File

@ -4,13 +4,11 @@ import (
"gralias/broker"
"gralias/config"
"gralias/models"
"gralias/pkg/cache"
"gralias/repos"
"html/template"
"log/slog"
"net/http"
"os"
"time"
)
var (
@ -29,13 +27,13 @@ func init() {
// memcache = cache.MemCache
cfg = config.LoadConfigOrDefault("")
Notifier = broker.Notifier
cache.MemCache.StartBackupRoutine(15 * time.Second) // Reduced backup interval
// cache.MemCache.StartBackupRoutine(15 * time.Second) // Reduced backup interval
// bot loader
// check the rooms if it has bot_{digits} in them, create bots if have
repo = repos.NewRepoProvider("sqlite3://../gralias.db")
recoverBots()
// if player has a roomID, but no team and role, try to recover
recoverPlayers()
// recoverPlayers()
}
func HandlePing(w http.ResponseWriter, r *http.Request) {