mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 11:13:12 -06:00
Delay device list updates too
This commit is contained in:
parent
be24eea797
commit
d45e629460
|
|
@ -119,11 +119,11 @@ func NewOutgoingQueues(
|
|||
} else {
|
||||
log.WithError(err).Error("Failed to get EDU server names for destination queue hydration")
|
||||
}
|
||||
offset := time.Duration(5)
|
||||
offset := time.Second * 5
|
||||
for serverName := range serverNames {
|
||||
if queue := queues.getQueue(serverName); queue != nil {
|
||||
time.AfterFunc(time.Second*offset, queue.wakeQueueIfNeeded)
|
||||
offset++
|
||||
time.AfterFunc(offset, queue.wakeQueueIfNeeded)
|
||||
offset += time.Second
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,8 +157,12 @@ func (u *DeviceListUpdater) Start() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
offset := time.Second * 10
|
||||
for _, userID := range staleLists {
|
||||
u.notifyWorkers(userID)
|
||||
time.AfterFunc(offset, func() {
|
||||
u.notifyWorkers(userID)
|
||||
})
|
||||
offset += time.Second
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue