mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] Use background context instead of request context for async processing (#888)
Fixes an issue where async processing was not completing correctly. In particular this applies to side effects of domain blocks: while the domain block was being entered and enforced correctly, side effects like deleting accounts and updating the instance entry for the blocked instance were not. This fixes that :)
This commit is contained in:
@ -75,7 +75,9 @@ func (p *processor) DomainBlockCreate(ctx context.Context, account *gtsmodel.Acc
|
||||
block = &newBlock
|
||||
|
||||
// Process the side effects of the domain block asynchronously since it might take a while
|
||||
go p.initiateDomainBlockSideEffects(ctx, account, block)
|
||||
go func() {
|
||||
p.initiateDomainBlockSideEffects(context.Background(), account, block)
|
||||
}()
|
||||
}
|
||||
|
||||
// Convert our gts model domain block into an API model
|
||||
|
Reference in New Issue
Block a user