Evict archive writers on deletion and sweep idle archives (closes #89) (#95)
Some checks failed
check / check (push) Has been cancelled
Some checks failed
check / check (push) Has been cancelled
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:
@@ -40,9 +40,15 @@ func main() {
|
||||
handlers.New,
|
||||
middleware.New,
|
||||
delivery.New,
|
||||
delivery.NewArchiveSweeper,
|
||||
// Wire *delivery.Engine as delivery.Notifier so the
|
||||
// webhook handler can notify the engine of new deliveries.
|
||||
func(e *delivery.Engine) delivery.Notifier { return e },
|
||||
// Wire *delivery.Engine as delivery.WebhookEvictor so
|
||||
// deleting a webhook releases its archive writer.
|
||||
func(e *delivery.Engine) delivery.WebhookEvictor {
|
||||
return e
|
||||
},
|
||||
server.New,
|
||||
),
|
||||
fx.Invoke(
|
||||
@@ -50,6 +56,7 @@ func main() {
|
||||
*server.Server,
|
||||
*delivery.Engine,
|
||||
*database.RetentionReaper,
|
||||
*delivery.ArchiveSweeper,
|
||||
) {
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user