X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fjob-queue%2Fhandlers%2Factivitypub-refresher.ts;h=c09b1bcc8f910addfdc0035df7a049dee2f23e76;hb=2539932e16129992a2c0889b4ff527c265a8e2c7;hp=4d6c38cfa0136ee122af6dc839c49fb6e4861362;hpb=9f79ade627f0044606a9fbbe16ca0154661d12b9;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/job-queue/handlers/activitypub-refresher.ts b/server/lib/job-queue/handlers/activitypub-refresher.ts index 4d6c38cfa..c09b1bcc8 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 { refreshVideoPlaylistIfNeeded } from '@server/lib/activitypub/playlist' +import { RefreshPayload } from '@shared/models' import { logger } from '../../../helpers/logger' import { fetchVideoByUrl } from '../../../helpers/video' -import { refreshActorIfNeeded, refreshVideoIfNeeded, refreshVideoPlaylistIfNeeded } from '../../activitypub' -import { ActorModel } from '../../../models/activitypub/actor' +import { ActorModel } from '../../../models/actor/actor' import { VideoPlaylistModel } from '../../../models/video/video-playlist' - -export type RefreshPayload = { - type: 'video' | 'video-playlist' | 'actor' - url: string -} +import { refreshActorIfNeeded } from '../../activitypub/actor' +import { refreshVideoIfNeeded } from '../../activitypub/videos' async function refreshAPObject (job: Bull.Job) { const payload = job.data as RefreshPayload