Add a statistics pane to the webhook page (closes #368)
check / check (push) Failing after 1m4s
check / check (push) Failing after 1m4s
Each webhook's event database keeps one row of running totals: events, deliveries and failures, and how many of each retention removed. Storing an event, creating a delivery, a delivery becoming failed and the retention sweep each update it in the transaction that writes or deletes the rows it counts. Deliveries get a finished_at column, the last column of the status index, so the last-10-minutes and last-24-hours figures are index-range counts. The pane is its own template, included at the top of the page. The schema changes in place with nothing back-filled, so an existing database must be recreated. Model: opus-5-5
This commit is contained in:
@@ -57,7 +57,9 @@ func testWebhookDB(t *testing.T) *gorm.DB {
|
||||
&database.Event{},
|
||||
&database.Delivery{},
|
||||
&database.DeliveryResult{},
|
||||
&database.Totals{},
|
||||
))
|
||||
require.NoError(t, db.Create(&database.Totals{}).Error)
|
||||
|
||||
return db
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user