From 6425b59d12810ae7f2bef284941222615ccdbc6d Mon Sep 17 00:00:00 2001 From: Daniel Cadenas Date: Fri, 27 Sep 2024 19:14:28 -0300 Subject: [PATCH 1/2] Only log nos users --- service/app/follow_change_puller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/app/follow_change_puller.go b/service/app/follow_change_puller.go index 0e871ae..e4201a7 100644 --- a/service/app/follow_change_puller.go +++ b/service/app/follow_change_puller.go @@ -55,7 +55,7 @@ func (f *FollowChangePuller) Run(ctx context.Context) error { } tokens, err := f.queries.GetTokens.Handle(ctx, followChangeAggregate.Followee) - if err != nil { + if err != nil || len(tokens) == 0 { // Not one of our users, ignore continue } From 7477393cc674419583095e861972061d8d2ebcc2 Mon Sep 17 00:00:00 2001 From: Daniel Cadenas Date: Fri, 27 Sep 2024 19:46:45 -0300 Subject: [PATCH 2/2] Proper error log --- service/app/follow_change_puller.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/service/app/follow_change_puller.go b/service/app/follow_change_puller.go index e4201a7..5006435 100644 --- a/service/app/follow_change_puller.go +++ b/service/app/follow_change_puller.go @@ -56,6 +56,14 @@ func (f *FollowChangePuller) Run(ctx context.Context) error { tokens, err := f.queries.GetTokens.Handle(ctx, followChangeAggregate.Followee) if err != nil || len(tokens) == 0 { + f.logger.Error(). + WithField("followee", followChangeAggregate.Followee.Hex()). + WithError(err). + Message("error getting tokens for followee") + continue + } + + if len(tokens) == 0 { // Not one of our users, ignore continue }