Other: Read sync workers setting from vault

This commit is contained in:
James Houlahan
2022-10-27 14:56:29 +02:00
parent d738fdff57
commit 3c4e8730ac
7 changed files with 54 additions and 5 deletions

View File

@ -74,6 +74,8 @@ type User struct {
abortable async.Abortable
goSync func()
syncWorkers int
syncBuffer int
showAllMail uint32
}
@ -85,6 +87,7 @@ func New(
encVault *vault.User,
client *liteapi.Client,
apiUser liteapi.User,
syncWorkers, syncBuffer int,
showAllMail bool,
) (*User, error) { //nolint:funlen
logrus.WithField("userID", apiUser.ID).Debug("Creating new user")
@ -158,6 +161,8 @@ func New(
tasks: xsync.NewGroup(context.Background()),
syncWorkers: syncWorkers,
syncBuffer: syncBuffer,
showAllMail: b32(showAllMail),
}