From 420e2fb22bc7aa4967ddadb11e444079efdf5117 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:23:11 +0100 Subject: replace async client API / federator msg processing with worker pools (#497) * replace async client API / federator msg processing with worker pools * appease our lord-and-saviour, the linter --- internal/processing/account/delete.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/processing/account/delete.go') diff --git a/internal/processing/account/delete.go b/internal/processing/account/delete.go index a114777cf..5b40804d8 100644 --- a/internal/processing/account/delete.go +++ b/internal/processing/account/delete.go @@ -159,13 +159,13 @@ selectStatusesLoop: // pass the status delete through the client api channel for processing s.Account = account l.Debug("putting status in the client api channel") - p.fromClientAPI <- messages.FromClientAPI{ + p.clientWorker.Queue(messages.FromClientAPI{ APObjectType: ap.ObjectNote, APActivityType: ap.ActivityDelete, GTSModel: s, OriginAccount: account, TargetAccount: account, - } + }) if err := p.db.DeleteByID(ctx, s.ID, s); err != nil { if err != db.ErrNoEntries { @@ -195,13 +195,13 @@ selectStatusesLoop: } l.Debug("putting boost undo in the client api channel") - p.fromClientAPI <- messages.FromClientAPI{ + p.clientWorker.Queue(messages.FromClientAPI{ APObjectType: ap.ActivityAnnounce, APActivityType: ap.ActivityUndo, GTSModel: s, OriginAccount: b.Account, TargetAccount: account, - } + }) if err := p.db.DeleteByID(ctx, b.ID, b); err != nil { if err != db.ErrNoEntries { @@ -331,7 +331,7 @@ func (p *processor) DeleteLocal(ctx context.Context, account *gtsmodel.Account, } // put the delete in the processor queue to handle the rest of it asynchronously - p.fromClientAPI <- fromClientAPIMessage + p.clientWorker.Queue(fromClientAPIMessage) return nil } -- cgit v1.2.3