summaryrefslogtreecommitdiff
path: root/internal/processing/account/delete.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2022-04-28 13:23:11 +0100
committerLibravatar GitHub <noreply@github.com>2022-04-28 13:23:11 +0100
commit420e2fb22bc7aa4967ddadb11e444079efdf5117 (patch)
tree413842c5df646c30a8079671ade5e677e3825fb8 /internal/processing/account/delete.go
parent[bugfix] Fix possible race condition in federatingdb (#490) (diff)
downloadgotosocial-420e2fb22bc7aa4967ddadb11e444079efdf5117.tar.xz
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
Diffstat (limited to 'internal/processing/account/delete.go')
-rw-r--r--internal/processing/account/delete.go10
1 files changed, 5 insertions, 5 deletions
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
}