aboutsummaryrefslogtreecommitdiff
path: root/keyserver
diff options
context:
space:
mode:
Diffstat (limited to 'keyserver')
-rw-r--r--keyserver/internal/device_list_update.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/keyserver/internal/device_list_update.go b/keyserver/internal/device_list_update.go
index 4b2b8c18..561c9a16 100644
--- a/keyserver/internal/device_list_update.go
+++ b/keyserver/internal/device_list_update.go
@@ -157,8 +157,15 @@ func (u *DeviceListUpdater) Start() error {
if err != nil {
return err
}
+ offset, step := time.Second*10, time.Second
+ if max := len(staleLists); max > 120 {
+ step = (time.Second * 120) / time.Duration(max)
+ }
for _, userID := range staleLists {
- u.notifyWorkers(userID)
+ time.AfterFunc(offset, func() {
+ u.notifyWorkers(userID)
+ })
+ offset += step
}
return nil
}