]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/schedulers/auto-follow-index-instances.ts
Try to fix subscriptions inconsistencies
[github/Chocobozzz/PeerTube.git] / 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 })