]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/schedulers/auto-follow-index-instances.ts
Only use basehref
[github/Chocobozzz/PeerTube.git] / server / lib / schedulers / auto-follow-index-instances.ts
index ef11fc87f944a781db0147a6bb50aaf8c201ca58..d700a99f0b82257d630c3a1db7232f8aea7fb9ef 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 })
@@ -55,8 +57,7 @@ export class AutoFollowIndexInstances extends AbstractScheduler {
             isAutoFollow: true
           }
 
-          await JobQueue.Instance.createJob({ type: 'activitypub-follow', payload })
-                  .catch(err => logger.error('Cannot create follow job for %s.', unfollowedHost, err))
+          JobQueue.Instance.createJob({ type: 'activitypub-follow', payload })
         }
       }