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/schedulers/auto-follow-index-instances.ts | 2 +- server/lib/schedulers/update-videos-scheduler.ts | 2 +- server/lib/schedulers/videos-redundancy-scheduler.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server/lib/schedulers') diff --git a/server/lib/schedulers/auto-follow-index-instances.ts b/server/lib/schedulers/auto-follow-index-instances.ts index a1f5e4a91..e852c7fc6 100644 --- a/server/lib/schedulers/auto-follow-index-instances.ts +++ b/server/lib/schedulers/auto-follow-index-instances.ts @@ -6,7 +6,7 @@ import { chunk } from 'lodash' import { doRequest } from '@server/helpers/requests' import { ActorFollowModel } from '@server/models/activitypub/actor-follow' import { JobQueue } from '@server/lib/job-queue' -import { getServerActor } from '@server/helpers/utils' +import { getServerActor } from '@server/models/application/application' export class AutoFollowIndexInstances extends AbstractScheduler { diff --git a/server/lib/schedulers/update-videos-scheduler.ts b/server/lib/schedulers/update-videos-scheduler.ts index 956780a77..d32c1c068 100644 --- a/server/lib/schedulers/update-videos-scheduler.ts +++ b/server/lib/schedulers/update-videos-scheduler.ts @@ -2,7 +2,7 @@ import { logger } from '../../helpers/logger' import { AbstractScheduler } from './abstract-scheduler' import { ScheduleVideoUpdateModel } from '../../models/video/schedule-video-update' import { retryTransactionWrapper } from '../../helpers/database-utils' -import { federateVideoIfNeeded } from '../activitypub' +import { federateVideoIfNeeded } from '../activitypub/videos' import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants' import { Notifier } from '../notifier' import { sequelizeTypescript } from '../../initializers/database' diff --git a/server/lib/schedulers/videos-redundancy-scheduler.ts b/server/lib/schedulers/videos-redundancy-scheduler.ts index e33a4133a..8da9d52b5 100644 --- a/server/lib/schedulers/videos-redundancy-scheduler.ts +++ b/server/lib/schedulers/videos-redundancy-scheduler.ts @@ -6,11 +6,10 @@ import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy' import { downloadWebTorrentVideo, generateMagnetUri } from '../../helpers/webtorrent' import { join } from 'path' import { move } from 'fs-extra' -import { getServerActor } from '../../helpers/utils' import { sendCreateCacheFile, sendUpdateCacheFile } from '../activitypub/send' import { getVideoCacheFileActivityPubUrl, getVideoCacheStreamingPlaylistActivityPubUrl } from '../activitypub/url' import { removeVideoRedundancy } from '../redundancy' -import { getOrCreateVideoAndAccountAndChannel } from '../activitypub' +import { getOrCreateVideoAndAccountAndChannel } from '../activitypub/videos' import { downloadPlaylistSegments } from '../hls' import { CONFIG } from '../../initializers/config' import { @@ -26,6 +25,7 @@ import { } from '@server/typings/models' import { getVideoFilename } from '../video-paths' import { VideoModel } from '@server/models/video/video' +import { getServerActor } from '@server/models/application/application' type CandidateToDuplicate = { redundancy: VideosRedundancyStrategy -- cgit v1.2.3