Fix auto index follow
authorChocobozzz <me@florianbigard.com>
Mon, 4 Nov 2019 14:20:34 +0000 (15:20 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 4 Nov 2019 14:20:34 +0000 (15:20 +0100)
server/lib/schedulers/auto-follow-index-instances.ts

index ef11fc87f944a781db0147a6bb50aaf8c201ca58..dd326bc1e1b5f56e6dbd065ea0a929136effd481 100644 (file)
@@ -36,7 +36,9 @@ export class AutoFollowIndexInstances extends AbstractScheduler {
 
       const uri = indexUrl + INSTANCES_INDEX.HOSTS_PATH
 
-      const qs = this.lastCheck ? { since: this.lastCheck.toISOString() } : {}
+      const qs = { count: 1000 }
+      if (this.lastCheck) Object.assign(qs, { since: this.lastCheck.toISOString() })
+
       this.lastCheck = new Date()
 
       const { body } = await doRequest({ uri, qs, json: true })