Rotate a database target's archive monthly, daily or hourly (closes #379)
check / check (push) Successful in 3m42s

A database target's rotation (none, monthly, daily or hourly) puts the
UTC period of each event's receive time in its archive file name, so
each file holds exactly its period's events. It is on the new webhook
page, the add target form and the target edit form, and shown in the
target list.

Renames move every one of a target's files, the sweep prunes every file
and deletes a rotated file it leaves empty, Download exports every file
oldest first with each row's period, and the target list names the
current file and totals the size of all of them.

Model: opus-5-5
This commit is contained in:
2026-10-02 23:51:42 +00:00
parent 22fa502638
commit 13f881007a
33 changed files with 1753 additions and 328 deletions
+5 -2
View File
@@ -72,8 +72,8 @@ document.addEventListener("alpine:init", function () {
// Something a click shows and hides: the mobile menu, an add form,
// an entrypoint's edit form, an event in the event log or in the
// recent events, a delivery's attempts, the new webhook page's
// archive pruning choice. It starts hidden, or shown when its
// element has the data-open attribute.
// archive pruning and rotation choices. It starts hidden, or shown
// when its element has the data-open attribute.
window.Alpine.data("collapsible", function () {
return {
open: false,
@@ -116,6 +116,7 @@ document.addEventListener("alpine:init", function () {
timeout: "",
maxRetries: "",
expiry: "",
rotation: "",
init() {
const refused = this.$root.dataset;
@@ -127,6 +128,7 @@ document.addEventListener("alpine:init", function () {
this.timeout = refused.timeout;
this.maxRetries = refused.maxRetries;
this.expiry = refused.expiry;
this.rotation = refused.rotation;
},
add() {
this.choosing = true;
@@ -145,6 +147,7 @@ document.addEventListener("alpine:init", function () {
this.timeout = "";
this.maxRetries = "";
this.expiry = "";
this.rotation = "";
this.$refs.form.reset();
},
get filling() {