Enha: db use same connection to avoid db locking
This commit is contained in:
		| @@ -24,16 +24,11 @@ func init() { | ||||
| 		Level:     slog.LevelDebug, | ||||
| 		AddSource: true, | ||||
| 	})) | ||||
| 	// memcache = cache.MemCache | ||||
| 	cfg = config.LoadConfigOrDefault("") | ||||
| 	Notifier = broker.Notifier | ||||
| 	// 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") | ||||
| 	// repo = repos.NewRepoProvider("sqlite3://../gralias.db") | ||||
| 	repo = repos.RP | ||||
| 	recoverBots() | ||||
| 	// if player has a roomID, but no team and role, try to recover | ||||
| 	// recoverPlayers() | ||||
| } | ||||
|  | ||||
| func HandlePing(w http.ResponseWriter, r *http.Request) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder