aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/crawl.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub/crawl.ts')
-rw-r--r--server/lib/activitypub/crawl.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/crawl.ts b/server/lib/activitypub/crawl.ts
index 28ff5225a..336129b82 100644
--- a/server/lib/activitypub/crawl.ts
+++ b/server/lib/activitypub/crawl.ts
@@ -1,13 +1,13 @@
1import { retryTransactionWrapper } from '@server/helpers/database-utils' 1import Bluebird from 'bluebird'
2import * as Bluebird from 'bluebird'
3import { URL } from 'url' 2import { URL } from 'url'
3import { retryTransactionWrapper } from '@server/helpers/database-utils'
4import { ActivityPubOrderedCollection } from '../../../shared/models/activitypub' 4import { ActivityPubOrderedCollection } from '../../../shared/models/activitypub'
5import { logger } from '../../helpers/logger' 5import { logger } from '../../helpers/logger'
6import { doJSONRequest } from '../../helpers/requests' 6import { doJSONRequest } from '../../helpers/requests'
7import { ACTIVITY_PUB, WEBSERVER } from '../../initializers/constants' 7import { ACTIVITY_PUB, WEBSERVER } from '../../initializers/constants'
8 8
9type HandlerFunction<T> = (items: T[]) => (Promise<any> | Bluebird<any>) 9type HandlerFunction<T> = (items: T[]) => (Promise<any> | Bluebird<any>)
10type CleanerFunction = (startedDate: Date) => (Promise<any> | Bluebird<any>) 10type CleanerFunction = (startedDate: Date) => Promise<any>
11 11
12async function crawlCollectionPage <T> (argUrl: string, handler: HandlerFunction<T>, cleaner?: CleanerFunction) { 12async function crawlCollectionPage <T> (argUrl: string, handler: HandlerFunction<T>, cleaner?: CleanerFunction) {
13 let url = argUrl 13 let url = argUrl