From da6a89646d6718f8e9d39ed65c82f9c8b2d9f480 Mon Sep 17 00:00:00 2001 From: Domino Valdano <2644901+reductionista@users.noreply.github.com> Date: Mon, 12 Aug 2024 20:35:00 -0700 Subject: [PATCH] Add func (o *ObservedORM ) DeleteExcessLogs --- core/chains/evm/logpoller/observability.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/chains/evm/logpoller/observability.go b/core/chains/evm/logpoller/observability.go index 782307e7d06..26dbe3b2638 100644 --- a/core/chains/evm/logpoller/observability.go +++ b/core/chains/evm/logpoller/observability.go @@ -142,6 +142,12 @@ func (o *ObservedORM) DeleteExpiredLogs(ctx context.Context, limit int64) (int64 }) } +func (o *ObservedORM) DeleteExcessLogs(ctx context.Context, limit int64) (int64, error) { + return withObservedExecAndRowsAffected(o, "DeleteExcessLogs", del, func() (int64, error) { + return o.ORM.DeleteExcessLogs(ctx, limit) + }) +} + func (o *ObservedORM) SelectBlockByNumber(ctx context.Context, n int64) (*LogPollerBlock, error) { return withObservedQuery(o, "SelectBlockByNumber", func() (*LogPollerBlock, error) { return o.ORM.SelectBlockByNumber(ctx, n)