feat: implement cron worker for daily statistics updates and weekly S3 database backups
All checks were successful
Build and Release / release (push) Successful in 1m28s

This commit is contained in:
2026-05-14 11:55:46 +07:00
parent 033e5bf60b
commit e7d4f5f7cd

View File

@@ -19,7 +19,7 @@ import (
func runStatistics(ctx context.Context, repo repositories.StatisticRepository) {
log.Info().Msg("Running daily statistics...")
today := time.Now().UTC().Truncate(24 * time.Hour)
today := time.Now().Truncate(24 * time.Hour)
_, err := repo.Upsert(ctx, today)
if err != nil {
log.Error().Err(err).Msg("Failed to upsert system statistics")