mirror of
https://github.com/ddworken/hishtory.git
synced 2024-12-27 09:18:55 +01:00
Skip storing user stats when running with sqlite, since the queries aren't compatible with sqlite
This commit is contained in:
parent
f84c2d86b5
commit
d0712f84c6
@ -288,6 +288,11 @@ type ActiveUserStats struct {
|
||||
}
|
||||
|
||||
func (db *DB) GenerateAndStoreActiveUserStats(ctx context.Context) error {
|
||||
if db.DB.Name() == "sqlite" {
|
||||
// Not supported on sqlite
|
||||
return nil
|
||||
}
|
||||
|
||||
totalNumDevices, err := extractInt64FromRow(db.WithContext(ctx).Raw("SELECT COUNT(DISTINCT devices.device_id) FROM devices").Row())
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user