aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue/handlers/activitypub-http-fetcher.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-23 09:32:53 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-05-04 16:21:39 +0200
commit8dc8a34ee8428e7657414115d1c137592efa174d (patch)
treee9b5ef0d7446d1b7766eac18da5a759edc7a9040 /server/lib/job-queue/handlers/activitypub-http-fetcher.ts
parent7fed637506043e4432cbebe041ada0625171cceb (diff)
downloadPeerTube-8dc8a34ee8428e7657414115d1c137592efa174d.tar.gz
PeerTube-8dc8a34ee8428e7657414115d1c137592efa174d.tar.zst
PeerTube-8dc8a34ee8428e7657414115d1c137592efa174d.zip
Avoir some circular dependencies
Diffstat (limited to 'server/lib/job-queue/handlers/activitypub-http-fetcher.ts')
-rw-r--r--server/lib/job-queue/handlers/activitypub-http-fetcher.ts13
1 files changed, 3 insertions, 10 deletions
diff --git a/server/lib/job-queue/handlers/activitypub-http-fetcher.ts b/server/lib/job-queue/handlers/activitypub-http-fetcher.ts
index 0182c5169..524aadc27 100644
--- a/server/lib/job-queue/handlers/activitypub-http-fetcher.ts
+++ b/server/lib/job-queue/handlers/activitypub-http-fetcher.ts
@@ -5,22 +5,15 @@ import { processActivities } from '../../activitypub/process'
5import { addVideoComments } from '../../activitypub/video-comments' 5import { addVideoComments } from '../../activitypub/video-comments'
6import { crawlCollectionPage } from '../../activitypub/crawl' 6import { crawlCollectionPage } from '../../activitypub/crawl'
7import { VideoModel } from '../../../models/video/video' 7import { VideoModel } from '../../../models/video/video'
8import { addVideoShares, createRates } from '../../activitypub' 8import { addVideoShares } from '../../activitypub/share'
9import { createRates } from '../../activitypub/video-rates'
9import { createAccountPlaylists } from '../../activitypub/playlist' 10import { createAccountPlaylists } from '../../activitypub/playlist'
10import { AccountModel } from '../../../models/account/account' 11import { AccountModel } from '../../../models/account/account'
11import { AccountVideoRateModel } from '../../../models/account/account-video-rate' 12import { AccountVideoRateModel } from '../../../models/account/account-video-rate'
12import { VideoShareModel } from '../../../models/video/video-share' 13import { VideoShareModel } from '../../../models/video/video-share'
13import { VideoCommentModel } from '../../../models/video/video-comment' 14import { VideoCommentModel } from '../../../models/video/video-comment'
14import { MAccountDefault, MVideoFullLight } from '../../../typings/models' 15import { MAccountDefault, MVideoFullLight } from '../../../typings/models'
15 16import { ActivitypubHttpFetcherPayload, FetchType } from '@shared/models'
16type FetchType = 'activity' | 'video-likes' | 'video-dislikes' | 'video-shares' | 'video-comments' | 'account-playlists'
17
18export type ActivitypubHttpFetcherPayload = {
19 uri: string
20 type: FetchType
21 videoId?: number
22 accountId?: number
23}
24 17
25async function processActivityPubHttpFetcher (job: Bull.Job) { 18async function processActivityPubHttpFetcher (job: Bull.Job) {
26 logger.info('Processing ActivityPub fetcher in job %d.', job.id) 19 logger.info('Processing ActivityPub fetcher in job %d.', job.id)