mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-07-27 10:42:29 +02:00
Compare commits
2 Commits
ab92e19725
...
af53a95df1
Author | SHA1 | Date | |
---|---|---|---|
|
af53a95df1 | ||
|
70fea76278 |
1
cache/account.go
vendored
1
cache/account.go
vendored
@ -58,7 +58,6 @@ func UpdateAccountLastActivity(uuid []byte) bool {
|
|||||||
return err == nil
|
return err == nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: This is not atomic
|
|
||||||
func UpdateAccountStats(uuid []byte, battles, classicSessionsPlayed int) bool {
|
func UpdateAccountStats(uuid []byte, battles, classicSessionsPlayed int) bool {
|
||||||
rdb.Do("SELECT", accountsDB)
|
rdb.Do("SELECT", accountsDB)
|
||||||
err := rdb.HIncrBy(string(uuid), "battles", int64(battles)).Err()
|
err := rdb.HIncrBy(string(uuid), "battles", int64(battles)).Err()
|
||||||
|
2
cache/game.go
vendored
2
cache/game.go
vendored
@ -27,7 +27,6 @@ func FetchPlayerCount() (int, bool) {
|
|||||||
return int(cachedPlayerCount), true
|
return int(cachedPlayerCount), true
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: This is not working
|
|
||||||
func FetchBattleCount() (int, bool) {
|
func FetchBattleCount() (int, bool) {
|
||||||
rdb.Do("SELECT", accountsDB)
|
rdb.Do("SELECT", accountsDB)
|
||||||
cachedBattleCount, err := rdb.Get("battleCount").Int()
|
cachedBattleCount, err := rdb.Get("battleCount").Int()
|
||||||
@ -44,7 +43,6 @@ func UpdateBattleCount(battleCount int) bool {
|
|||||||
return err == nil
|
return err == nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: This is not working
|
|
||||||
func FetchClassicSessionCount() (int, bool) {
|
func FetchClassicSessionCount() (int, bool) {
|
||||||
rdb.Do("SELECT", accountsDB)
|
rdb.Do("SELECT", accountsDB)
|
||||||
cachedClassicSessionCount, err := rdb.Get("classicSessionCount").Int()
|
cachedClassicSessionCount, err := rdb.Get("classicSessionCount").Int()
|
||||||
|
Loading…
Reference in New Issue
Block a user