mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-14 16:07:29 -06:00
remove old timeline initialization code, bump go-structr to v0.9.4
This commit is contained in:
parent
5ef24340f7
commit
25c57a49d1
1 changed files with 0 additions and 36 deletions
|
|
@ -42,12 +42,10 @@ import (
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/middleware"
|
"github.com/superseriousbusiness/gotosocial/internal/middleware"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/observability"
|
"github.com/superseriousbusiness/gotosocial/internal/observability"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/oidc"
|
"github.com/superseriousbusiness/gotosocial/internal/oidc"
|
||||||
tlprocessor "github.com/superseriousbusiness/gotosocial/internal/processing/timeline"
|
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/router"
|
"github.com/superseriousbusiness/gotosocial/internal/router"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/state"
|
"github.com/superseriousbusiness/gotosocial/internal/state"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/storage"
|
"github.com/superseriousbusiness/gotosocial/internal/storage"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/subscriptions"
|
"github.com/superseriousbusiness/gotosocial/internal/subscriptions"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/timeline"
|
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
|
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/web"
|
"github.com/superseriousbusiness/gotosocial/internal/web"
|
||||||
"github.com/superseriousbusiness/gotosocial/testrig"
|
"github.com/superseriousbusiness/gotosocial/testrig"
|
||||||
|
|
@ -89,20 +87,6 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
||||||
// tasks from being executed.
|
// tasks from being executed.
|
||||||
testrig.StopWorkers(state)
|
testrig.StopWorkers(state)
|
||||||
|
|
||||||
if state.Timelines.Home != nil {
|
|
||||||
// Home timeline mgr was setup, ensure it gets stopped.
|
|
||||||
if err := state.Timelines.Home.Stop(); err != nil {
|
|
||||||
log.Errorf(ctx, "error stopping home timeline: %v", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if state.Timelines.List != nil {
|
|
||||||
// List timeline mgr was setup, ensure it gets stopped.
|
|
||||||
if err := state.Timelines.List.Stop(); err != nil {
|
|
||||||
log.Errorf(ctx, "error stopping list timeline: %v", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if state.Storage != nil {
|
if state.Storage != nil {
|
||||||
// If storage was created, ensure torn down.
|
// If storage was created, ensure torn down.
|
||||||
testrig.StandardStorageTeardown(state.Storage)
|
testrig.StandardStorageTeardown(state.Storage)
|
||||||
|
|
@ -172,26 +156,6 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
||||||
typeConverter := typeutils.NewConverter(state)
|
typeConverter := typeutils.NewConverter(state)
|
||||||
filter := visibility.NewFilter(state)
|
filter := visibility.NewFilter(state)
|
||||||
|
|
||||||
// Initialize both home / list timelines.
|
|
||||||
state.Timelines.Home = timeline.NewManager(
|
|
||||||
tlprocessor.HomeTimelineGrab(state),
|
|
||||||
tlprocessor.HomeTimelineFilter(state, filter),
|
|
||||||
tlprocessor.HomeTimelineStatusPrepare(state, typeConverter),
|
|
||||||
tlprocessor.SkipInsert(),
|
|
||||||
)
|
|
||||||
if err := state.Timelines.Home.Start(); err != nil {
|
|
||||||
return fmt.Errorf("error starting home timeline: %s", err)
|
|
||||||
}
|
|
||||||
state.Timelines.List = timeline.NewManager(
|
|
||||||
tlprocessor.ListTimelineGrab(state),
|
|
||||||
tlprocessor.ListTimelineFilter(state, filter),
|
|
||||||
tlprocessor.ListTimelineStatusPrepare(state, typeConverter),
|
|
||||||
tlprocessor.SkipInsert(),
|
|
||||||
)
|
|
||||||
if err := state.Timelines.List.Start(); err != nil {
|
|
||||||
return fmt.Errorf("error starting list timeline: %s", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
processor := testrig.NewTestProcessor(state, federator, emailSender, webPushSender, mediaManager)
|
processor := testrig.NewTestProcessor(state, federator, emailSender, webPushSender, mediaManager)
|
||||||
|
|
||||||
// Initialize workers.
|
// Initialize workers.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue