diff options
author | 2022-10-04 17:50:29 +0200 | |
---|---|---|
committer | 2022-10-04 17:50:29 +0200 | |
commit | 359ed1bcb5b6cd4ebe915a8847395b61e9995a41 (patch) | |
tree | d15b4a565ca415289c6cce2afe3ce5431f1b7976 /internal/processing/admin/mediaprune.go | |
parent | [frontend] scroll to highlighted toot, improve highlight (#885) (diff) | |
download | gotosocial-359ed1bcb5b6cd4ebe915a8847395b61e9995a41.tar.xz |
[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 :)
Diffstat (limited to 'internal/processing/admin/mediaprune.go')
-rw-r--r-- | internal/processing/admin/mediaprune.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/processing/admin/mediaprune.go b/internal/processing/admin/mediaprune.go index 40652c3ca..c7fbbdc1e 100644 --- a/internal/processing/admin/mediaprune.go +++ b/internal/processing/admin/mediaprune.go @@ -33,7 +33,7 @@ func (p *processor) MediaPrune(ctx context.Context, mediaRemoteCacheDays int) gt } go func() { - pruned, err := p.mediaManager.PruneAllRemote(ctx, mediaRemoteCacheDays) + pruned, err := p.mediaManager.PruneAllRemote(context.Background(), mediaRemoteCacheDays) if err != nil { log.Errorf("MediaPrune: error pruning remote cache: %s", err) } else { @@ -42,7 +42,7 @@ func (p *processor) MediaPrune(ctx context.Context, mediaRemoteCacheDays int) gt }() go func() { - pruned, err := p.mediaManager.PruneUnusedLocalAttachments(ctx) + pruned, err := p.mediaManager.PruneUnusedLocalAttachments(context.Background()) if err != nil { log.Errorf("MediaPrune: error pruning unused local cache: %s", err) } else { @@ -51,7 +51,7 @@ func (p *processor) MediaPrune(ctx context.Context, mediaRemoteCacheDays int) gt }() go func() { - pruned, err := p.mediaManager.PruneAllMeta(ctx) + pruned, err := p.mediaManager.PruneAllMeta(context.Background()) if err != nil { log.Errorf("MediaPrune: error pruning meta: %s", err) } else { |