Stats: Stop counting the same user multiple times (#26777)
* Stats: Cache based stats implementation * Stats: Correct logic and add larger scale test * Stats: linter * Stats: SQL implementation * Stats: cleanup SQL * Stats: Tab -> Spaces * Update pkg/services/sqlstore/stats.go Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com> * Stats: Quote 'user' table with dialect.Quote * Stats: Ensure test is run as integration test * Stats: Use boolean value ...because if (v) { true } else { false } is unnecessary at best. Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
This commit is contained in:
co-authored by
Sofia Papagiannaki
parent
09a1af3f91
commit
954a2811b3
+9
-7
@@ -92,13 +92,15 @@ type GetSystemUserCountStatsQuery struct {
|
||||
Result *SystemUserCountStats
|
||||
}
|
||||
|
||||
type ActiveUserStats struct {
|
||||
ActiveUsers int64
|
||||
ActiveAdmins int64
|
||||
ActiveEditors int64
|
||||
ActiveViewers int64
|
||||
type UserStats struct {
|
||||
Users int64
|
||||
Admins int64
|
||||
Editors int64
|
||||
Viewers int64
|
||||
}
|
||||
|
||||
type GetActiveUserStatsQuery struct {
|
||||
Result *ActiveUserStats
|
||||
type GetUserStatsQuery struct {
|
||||
MustUpdate bool
|
||||
Active bool
|
||||
Result UserStats
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user