diff options
author | Chocobozzz <me@florianbigard.com> | 2021-08-27 14:32:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-08-27 15:12:22 +0200 |
commit | 41fb13c330de629df2d23379209e79c7af0f2e9a (patch) | |
tree | 73bc5a90566406b3910f142beae2a879c1e4265d /server/lib/activitypub/crawl.ts | |
parent | 40e7ed0714f96c01e16de3ac971a4b28116294e1 (diff) | |
download | PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.gz PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.tar.zst PeerTube-41fb13c330de629df2d23379209e79c7af0f2e9a.zip |
esModuleInterop to true
Diffstat (limited to 'server/lib/activitypub/crawl.ts')
-rw-r--r-- | server/lib/activitypub/crawl.ts | 6 |
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 @@ | |||
1 | import { retryTransactionWrapper } from '@server/helpers/database-utils' | 1 | import Bluebird from 'bluebird' |
2 | import * as Bluebird from 'bluebird' | ||
3 | import { URL } from 'url' | 2 | import { URL } from 'url' |
3 | import { retryTransactionWrapper } from '@server/helpers/database-utils' | ||
4 | import { ActivityPubOrderedCollection } from '../../../shared/models/activitypub' | 4 | import { ActivityPubOrderedCollection } from '../../../shared/models/activitypub' |
5 | import { logger } from '../../helpers/logger' | 5 | import { logger } from '../../helpers/logger' |
6 | import { doJSONRequest } from '../../helpers/requests' | 6 | import { doJSONRequest } from '../../helpers/requests' |
7 | import { ACTIVITY_PUB, WEBSERVER } from '../../initializers/constants' | 7 | import { ACTIVITY_PUB, WEBSERVER } from '../../initializers/constants' |
8 | 8 | ||
9 | type HandlerFunction<T> = (items: T[]) => (Promise<any> | Bluebird<any>) | 9 | type HandlerFunction<T> = (items: T[]) => (Promise<any> | Bluebird<any>) |
10 | type CleanerFunction = (startedDate: Date) => (Promise<any> | Bluebird<any>) | 10 | type CleanerFunction = (startedDate: Date) => Promise<any> |
11 | 11 | ||
12 | async function crawlCollectionPage <T> (argUrl: string, handler: HandlerFunction<T>, cleaner?: CleanerFunction) { | 12 | async function crawlCollectionPage <T> (argUrl: string, handler: HandlerFunction<T>, cleaner?: CleanerFunction) { |
13 | let url = argUrl | 13 | let url = argUrl |