aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/schedulers
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/schedulers')
-rw-r--r--server/lib/schedulers/auto-follow-index-instances.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/lib/schedulers/auto-follow-index-instances.ts b/server/lib/schedulers/auto-follow-index-instances.ts
index e852c7fc6..a57436a45 100644
--- a/server/lib/schedulers/auto-follow-index-instances.ts
+++ b/server/lib/schedulers/auto-follow-index-instances.ts
@@ -42,6 +42,10 @@ export class AutoFollowIndexInstances extends AbstractScheduler {
42 this.lastCheck = new Date() 42 this.lastCheck = new Date()
43 43
44 const { body } = await doRequest<any>({ uri, qs, json: true }) 44 const { body } = await doRequest<any>({ uri, qs, json: true })
45 if (!body.data || Array.isArray(body.data) === false) {
46 logger.error('Cannot auto follow instances of index %s: bad URL format. Please check the auto follow URL.', indexUrl)
47 return
48 }
45 49
46 const hosts: string[] = body.data.map(o => o.host) 50 const hosts: string[] = body.data.map(o => o.host)
47 const chunks = chunk(hosts, 20) 51 const chunks = chunk(hosts, 20)