mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore] move client/federator workerpools to Workers{} (#1575)
* replace concurrency worker pools with base models in State.Workers, update code and tests accordingly * improve code comment * change back testrig default log level * un-comment-out TestAnnounceTwice() and fix --------- Signed-off-by: kim <grufwub@gmail.com> Reviewed-by: tobi
This commit is contained in:
@@ -19,17 +19,12 @@
|
||||
package testrig
|
||||
|
||||
import (
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/media"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/state"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/storage"
|
||||
)
|
||||
|
||||
// NewTestMediaManager returns a media handler with the default test config, and the given db and storage.
|
||||
func NewTestMediaManager(db db.DB, storage *storage.Driver) media.Manager {
|
||||
var state state.State
|
||||
state.DB = db
|
||||
state.Storage = storage
|
||||
state.Workers.Start()
|
||||
return media.NewManager(&state)
|
||||
func NewTestMediaManager(state *state.State) media.Manager {
|
||||
StartWorkers(state) // ensure started
|
||||
return media.NewManager(state)
|
||||
}
|
||||
|
Reference in New Issue
Block a user