mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
replace async client API / federator msg processing with worker pools (#497)
* replace async client API / federator msg processing with worker pools * appease our lord-and-saviour, the linter
This commit is contained in:
@@ -34,7 +34,6 @@ import (
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/id"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/messages"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/uris"
|
||||
)
|
||||
|
||||
@@ -310,7 +309,7 @@ func (f *federatingDB) collectIRIs(ctx context.Context, iris []*url.URL) (vocab.
|
||||
// - The requesting account that posted to the inbox.
|
||||
// - A channel that messages for the processor can be placed into.
|
||||
// If a value is not present, nil will be returned for it. It's up to the caller to check this and respond appropriately.
|
||||
func extractFromCtx(ctx context.Context) (receivingAccount, requestingAccount *gtsmodel.Account, fromFederatorChan chan messages.FromFederator) {
|
||||
func extractFromCtx(ctx context.Context) (receivingAccount, requestingAccount *gtsmodel.Account) {
|
||||
receivingAccountI := ctx.Value(ap.ContextReceivingAccount)
|
||||
if receivingAccountI != nil {
|
||||
var ok bool
|
||||
@@ -329,15 +328,6 @@ func extractFromCtx(ctx context.Context) (receivingAccount, requestingAccount *g
|
||||
}
|
||||
}
|
||||
|
||||
fromFederatorChanI := ctx.Value(ap.ContextFromFederatorChan)
|
||||
if fromFederatorChanI != nil {
|
||||
var ok bool
|
||||
fromFederatorChan, ok = fromFederatorChanI.(chan messages.FromFederator)
|
||||
if !ok {
|
||||
logrus.Panicf("extractFromCtx: context entry with key %s could not be asserted to chan messages.FromFederator", ap.ContextFromFederatorChan)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user