shared hashes: separate background job with visible state
Cross Compile Go / build (push) Canceled after 0s

- compute duplicate-hash statistics in their own job (startup, hourly,
  on demand) so they no longer block the table stats
- single-pass query over DISTINCT (hash, addon_id), 15 min timeout
- record errors and panics; never stay stuck in a computing state
- whitelist page polls while computing, shows errors and a Recompute
  button; tab is linkable via ?tab=shared
This commit is contained in:
ilbinek committed 2026-10-04 03:16:29 +02:00
1 parent 56d9e10621
commit 748db94d55
8 files changed
+436 -127

No files matched your search

+3 -2
View File
@@ -199,7 +199,8 @@ func maintenance(c *gin.Context) {
}
switch body.Action {
case "refresh-stats":
requestHeavyRefresh(true)
requestHeavyRefresh()
requestDupRefresh()
case "flush-metrics":
metrics.FlushAll()
case "rollup":
@@ -240,5 +241,5 @@ func purgeDeletedFiles(days int) {
metrics.Event("info", "purged deleted file rows", map[string]any{
"kind": "maintenance", "deleted": total, "olderThanDays": days, "tookSec": int64(time.Since(started).Seconds()),
})
requestHeavyRefresh(false)
requestHeavyRefresh()
}