mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-30 21:12:45 +00:00
Some tweaks for the device list updater (#3251)
This makes the following changes: - Adds two new metrics observing the usage of the `DeviceListUpdater` workers - Makes the number of workers configurable - Adds a 30s timeout for DB requests when receiving a device list update over federation
This commit is contained in:
parent
32f7c4b166
commit
da7bca0224
18 changed files with 92 additions and 47 deletions
|
@ -21,6 +21,10 @@ type UserAPI struct {
|
|||
// Users who register on this homeserver will automatically
|
||||
// be joined to the rooms listed under this option.
|
||||
AutoJoinRooms []string `yaml:"auto_join_rooms"`
|
||||
|
||||
// The number of workers to start for the DeviceListUpdater. Defaults to 8.
|
||||
// This only needs updating if the "InputDeviceListUpdate" stream keeps growing indefinitely.
|
||||
WorkerCount int `yaml:"worker_count"`
|
||||
}
|
||||
|
||||
const DefaultOpenIDTokenLifetimeMS = 3600000 // 60 minutes
|
||||
|
@ -28,6 +32,7 @@ const DefaultOpenIDTokenLifetimeMS = 3600000 // 60 minutes
|
|||
func (c *UserAPI) Defaults(opts DefaultOpts) {
|
||||
c.BCryptCost = bcrypt.DefaultCost
|
||||
c.OpenIDTokenLifetimeMS = DefaultOpenIDTokenLifetimeMS
|
||||
c.WorkerCount = 8
|
||||
if opts.Generate {
|
||||
if !opts.SingleDatabase {
|
||||
c.AccountDatabase.ConnectionString = "file:userapi_accounts.db"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue