aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2023-10-31 16:39:45 +0100
committerGitHub <noreply@github.com>2023-10-31 16:39:45 +0100
commitda7bca0224760a4fe0e10876a9c11da333513a29 (patch)
tree87ce9477ac5256c5ccfbadd0dfe989fe4cb15a3e /setup
parent32f7c4b166c5e74ef34973a1d6a30e5e2d75c3ed (diff)
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
Diffstat (limited to 'setup')
-rw-r--r--setup/config/config_userapi.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/setup/config/config_userapi.go b/setup/config/config_userapi.go
index e64a3910..559de72a 100644
--- a/setup/config/config_userapi.go
+++ b/setup/config/config_userapi.go
@@ -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"