Evict archive writers on deletion and sweep idle archives (closes #89) (#95)
check / check (push) Superseded by a newer commit; never tested

Per-webhook archive writers are now evicted when the webhook or its last
database target is deleted, and a background sweeper prunes expired rows from
idle archives that no longer receive writes. Archive files themselves are never
deleted.
This commit was merged in pull request #95.
This commit is contained in:
2026-08-10 15:52:20 +02:00
rodzic 62481a6f1a
commit 3e261d2f01
16 zmienionych plików z 2558 dodań i 20 usunięć
+4 -1
Wyświetl plik
@@ -90,12 +90,15 @@ func (e *Engine) initTargets(client *http.Client) {
client: client,
}
dbT := &databaseTarget{eng: e}
e.httpTarget = httpT
e.dbTarget = dbT
e.targets = map[database.TargetType]Target{
database.TargetTypeHTTP: httpT,
database.TargetTypeSlack: slackT,
database.TargetTypeDatabase: &databaseTarget{eng: e},
database.TargetTypeDatabase: dbT,
database.TargetTypeLog: &logTarget{eng: e},
}
}