This commit is contained in:
hashbro
2026-09-17 00:25:39 +08:00
parent a49fb2415d
commit 2d18331feb
13 changed files with 475 additions and 91 deletions
+4 -2
View File
@@ -12,7 +12,8 @@ class DailyStatsCommand extends Command
{--days=30 : Inclusive local days ending today (ignored when --all or --from is set)}
{--from= : Start date Y-m-d}
{--to= : End date Y-m-d (default today)}
{--all : From the earliest visit/device through --to}';
{--all : From the earliest visit/device through --to}
{--force : Recompute every day in range (implied by --all)}';
protected $description = 'Rebuild daily_stats and analytics_daily_dims rollups (UV / devices / version dims)';
@@ -24,7 +25,8 @@ class DailyStatsCommand extends Command
[$from, $to] = [$to->copy()->startOfDay(), $from->copy()->endOfDay()];
}
$result = $reports->rebuildAll($from, $to);
$force = (bool) $this->option('force') || (bool) $this->option('all');
$result = $reports->rebuildAll($from, $to, $force);
$this->info(sprintf(
'daily-stats rebuilt=%d agents=%d from=%s to=%s',
$result['days'],