mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 09:27:34 -06:00
[bugfix] process account delete side effects in serial, not in parallel (#2360)
* [bugfix] process account delete side effects in serial, not in parallel * StartWorkers / StartNoopWorkers for tests * undo testrig trace logging * log errors instead of immediately returning
This commit is contained in:
parent
0b99f14d64
commit
4ee436e98a
41 changed files with 181 additions and 102 deletions
|
|
@ -317,11 +317,9 @@ func (d *Dereferencer) RefreshAccountAsync(ctx context.Context, requestUser stri
|
|||
|
||||
if apubAcc != nil {
|
||||
// This account was updated, enqueue re-dereference featured posts.
|
||||
d.state.Workers.Federator.MustEnqueueCtx(ctx, func(ctx context.Context) {
|
||||
if err := d.dereferenceAccountFeatured(ctx, requestUser, latest); err != nil {
|
||||
log.Errorf(ctx, "error fetching account featured collection: %v", err)
|
||||
}
|
||||
})
|
||||
if err := d.dereferenceAccountFeatured(ctx, requestUser, latest); err != nil {
|
||||
log.Errorf(ctx, "error fetching account featured collection: %v", err)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ func (suite *DereferencerStandardTestSuite) SetupTest() {
|
|||
suite.testEmojis = testrig.NewTestEmojis()
|
||||
|
||||
suite.state.Caches.Init()
|
||||
testrig.StartWorkers(&suite.state)
|
||||
testrig.StartNoopWorkers(&suite.state)
|
||||
|
||||
suite.db = testrig.NewTestDB(&suite.state)
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ func (suite *FederatingDBTestSuite) SetupTest() {
|
|||
testrig.InitTestLog()
|
||||
|
||||
suite.state.Caches.Init()
|
||||
testrig.StartWorkers(&suite.state)
|
||||
testrig.StartNoopWorkers(&suite.state)
|
||||
|
||||
suite.fromFederator = make(chan messages.FromFediAPI, 10)
|
||||
suite.state.Workers.EnqueueFediAPI = func(ctx context.Context, msgs ...messages.FromFediAPI) {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ func (suite *FederatorStandardTestSuite) SetupSuite() {
|
|||
|
||||
func (suite *FederatorStandardTestSuite) SetupTest() {
|
||||
suite.state.Caches.Init()
|
||||
testrig.StartWorkers(&suite.state)
|
||||
testrig.StartNoopWorkers(&suite.state)
|
||||
|
||||
testrig.InitTestConfig()
|
||||
testrig.InitTestLog()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue