diff options
author | 2023-03-01 18:26:53 +0000 | |
---|---|---|
committer | 2023-03-01 18:26:53 +0000 | |
commit | baf933cb9f3e1053bdb61b90d7027efe9fad1bc2 (patch) | |
tree | 3f2a76851d58517ca3dece2bacd6aceefd8dfb96 /internal/processing/statustimeline.go | |
parent | [feature] Federate pinned posts (aka `featuredCollection`) in and out (#1560) (diff) | |
download | gotosocial-baf933cb9f3e1053bdb61b90d7027efe9fad1bc2.tar.xz |
[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
Diffstat (limited to 'internal/processing/statustimeline.go')
-rw-r--r-- | internal/processing/statustimeline.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/processing/statustimeline.go b/internal/processing/statustimeline.go index 7c9f36f16..8c8e20316 100644 --- a/internal/processing/statustimeline.go +++ b/internal/processing/statustimeline.go @@ -173,7 +173,7 @@ func (p *Processor) HomeTimelineGet(ctx context.Context, authed *oauth.Auth, max } func (p *Processor) PublicTimelineGet(ctx context.Context, authed *oauth.Auth, maxID string, sinceID string, minID string, limit int, local bool) (*apimodel.PageableResponse, gtserror.WithCode) { - statuses, err := p.db.GetPublicTimeline(ctx, maxID, sinceID, minID, limit, local) + statuses, err := p.state.DB.GetPublicTimeline(ctx, maxID, sinceID, minID, limit, local) if err != nil { if err == db.ErrNoEntries { // there are just no entries left @@ -218,7 +218,7 @@ func (p *Processor) PublicTimelineGet(ctx context.Context, authed *oauth.Auth, m } func (p *Processor) FavedTimelineGet(ctx context.Context, authed *oauth.Auth, maxID string, minID string, limit int) (*apimodel.PageableResponse, gtserror.WithCode) { - statuses, nextMaxID, prevMinID, err := p.db.GetFavedTimeline(ctx, authed.Account.ID, maxID, minID, limit) + statuses, nextMaxID, prevMinID, err := p.state.DB.GetFavedTimeline(ctx, authed.Account.ID, maxID, minID, limit) if err != nil { if err == db.ErrNoEntries { // there are just no entries left @@ -255,7 +255,7 @@ func (p *Processor) filterPublicStatuses(ctx context.Context, authed *oauth.Auth apiStatuses := []*apimodel.Status{} for _, s := range statuses { targetAccount := >smodel.Account{} - if err := p.db.GetByID(ctx, s.AccountID, targetAccount); err != nil { + if err := p.state.DB.GetByID(ctx, s.AccountID, targetAccount); err != nil { if err == db.ErrNoEntries { log.Debugf(ctx, "skipping status %s because account %s can't be found in the db", s.ID, s.AccountID) continue @@ -288,7 +288,7 @@ func (p *Processor) filterFavedStatuses(ctx context.Context, authed *oauth.Auth, apiStatuses := []*apimodel.Status{} for _, s := range statuses { targetAccount := >smodel.Account{} - if err := p.db.GetByID(ctx, s.AccountID, targetAccount); err != nil { + if err := p.state.DB.GetByID(ctx, s.AccountID, targetAccount); err != nil { if err == db.ErrNoEntries { log.Debugf(ctx, "skipping status %s because account %s can't be found in the db", s.ID, s.AccountID) continue |