mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-20 20:07:52 +02:00
Skip storing user stats when running with sqlite, since the queries aren't compatible with sqlite
This commit is contained in:
parent
b1988d7022
commit
4370820281
@ -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…
x
Reference in New Issue
Block a user