mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 13:52:46 +00:00
Persistent federation sender blacklist (#1214)
* Initial persistence of blacklists * Move statistics folder * Make MaxFederationRetries configurable * Set lower failure thresholds for Yggdrasil demos * Still write events into database for blacklisted hosts (they can be tidied up later) * Review comments
This commit is contained in:
parent
470933789b
commit
1e71fd645e
15 changed files with 343 additions and 51 deletions
|
@ -21,8 +21,8 @@ import (
|
|||
"github.com/matrix-org/dendrite/federationsender/internal"
|
||||
"github.com/matrix-org/dendrite/federationsender/inthttp"
|
||||
"github.com/matrix-org/dendrite/federationsender/queue"
|
||||
"github.com/matrix-org/dendrite/federationsender/statistics"
|
||||
"github.com/matrix-org/dendrite/federationsender/storage"
|
||||
"github.com/matrix-org/dendrite/federationsender/types"
|
||||
"github.com/matrix-org/dendrite/internal/setup"
|
||||
roomserverAPI "github.com/matrix-org/dendrite/roomserver/api"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
|
@ -48,9 +48,13 @@ func NewInternalAPI(
|
|||
logrus.WithError(err).Panic("failed to connect to federation sender db")
|
||||
}
|
||||
|
||||
statistics := &types.Statistics{}
|
||||
stats := &statistics.Statistics{
|
||||
DB: federationSenderDB,
|
||||
FailuresUntilBlacklist: base.Cfg.Matrix.FederationMaxRetries,
|
||||
}
|
||||
|
||||
queues := queue.NewOutgoingQueues(
|
||||
federationSenderDB, base.Cfg.Matrix.ServerName, federation, rsAPI, statistics,
|
||||
federationSenderDB, base.Cfg.Matrix.ServerName, federation, rsAPI, stats,
|
||||
&queue.SigningInfo{
|
||||
KeyID: base.Cfg.Matrix.KeyID,
|
||||
PrivateKey: base.Cfg.Matrix.PrivateKey,
|
||||
|
@ -73,5 +77,5 @@ func NewInternalAPI(
|
|||
logrus.WithError(err).Panic("failed to start typing server consumer")
|
||||
}
|
||||
|
||||
return internal.NewFederationSenderInternalAPI(federationSenderDB, base.Cfg, rsAPI, federation, keyRing, statistics, queues)
|
||||
return internal.NewFederationSenderInternalAPI(federationSenderDB, base.Cfg, rsAPI, federation, keyRing, stats, queues)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue