From 8dc8a34ee8428e7657414115d1c137592efa174d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 23 Apr 2020 09:32:53 +0200 Subject: Avoir some circular dependencies --- server/lib/job-queue/handlers/activitypub-refresher.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'server/lib/job-queue/handlers/activitypub-refresher.ts') diff --git a/server/lib/job-queue/handlers/activitypub-refresher.ts b/server/lib/job-queue/handlers/activitypub-refresher.ts index 4d6c38cfa..666e56868 100644 --- a/server/lib/job-queue/handlers/activitypub-refresher.ts +++ b/server/lib/job-queue/handlers/activitypub-refresher.ts @@ -1,14 +1,12 @@ import * as Bull from 'bull' import { logger } from '../../../helpers/logger' import { fetchVideoByUrl } from '../../../helpers/video' -import { refreshActorIfNeeded, refreshVideoIfNeeded, refreshVideoPlaylistIfNeeded } from '../../activitypub' +import { refreshActorIfNeeded } from '../../activitypub/actor' +import { refreshVideoIfNeeded } from '../../activitypub/videos' import { ActorModel } from '../../../models/activitypub/actor' import { VideoPlaylistModel } from '../../../models/video/video-playlist' - -export type RefreshPayload = { - type: 'video' | 'video-playlist' | 'actor' - url: string -} +import { RefreshPayload } from '@shared/models' +import { refreshVideoPlaylistIfNeeded } from '@server/lib/activitypub/playlist' async function refreshAPObject (job: Bull.Job) { const payload = job.data as RefreshPayload -- cgit v1.2.3