diff options
Diffstat (limited to 'server/lib/activitypub/videos')
-rw-r--r-- | server/lib/activitypub/videos/refresh.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/videos/refresh.ts b/server/lib/activitypub/videos/refresh.ts index 3af08acf4..9f952a218 100644 --- a/server/lib/activitypub/videos/refresh.ts +++ b/server/lib/activitypub/videos/refresh.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { logger, loggerTagsFactory } from '@server/helpers/logger' | 1 | import { logger, loggerTagsFactory } from '@server/helpers/logger' |
2 | import { PeerTubeRequestError } from '@server/helpers/requests' | 2 | import { PeerTubeRequestError } from '@server/helpers/requests' |
3 | import { ActorFollowScoreCache } from '@server/lib/files-cache' | ||
4 | import { VideoLoadByUrlType } from '@server/lib/model-loaders' | 3 | import { VideoLoadByUrlType } from '@server/lib/model-loaders' |
5 | import { VideoModel } from '@server/models/video/video' | 4 | import { VideoModel } from '@server/models/video/video' |
6 | import { MVideoAccountLightBlacklistAllFiles, MVideoThumbnail } from '@server/types/models' | 5 | import { MVideoAccountLightBlacklistAllFiles, MVideoThumbnail } from '@server/types/models' |
7 | import { HttpStatusCode } from '@shared/models' | 6 | import { HttpStatusCode } from '@shared/models' |
7 | import { ActorFollowHealthCache } from '../../actor-follow-health-cache' | ||
8 | import { fetchRemoteVideo, SyncParam, syncVideoExternalAttributes } from './shared' | 8 | import { fetchRemoteVideo, SyncParam, syncVideoExternalAttributes } from './shared' |
9 | import { APVideoUpdater } from './updater' | 9 | import { APVideoUpdater } from './updater' |
10 | 10 | ||
@@ -39,7 +39,7 @@ async function refreshVideoIfNeeded (options: { | |||
39 | 39 | ||
40 | await syncVideoExternalAttributes(video, videoObject, options.syncParam) | 40 | await syncVideoExternalAttributes(video, videoObject, options.syncParam) |
41 | 41 | ||
42 | ActorFollowScoreCache.Instance.addGoodServerId(video.VideoChannel.Actor.serverId) | 42 | ActorFollowHealthCache.Instance.addGoodServerId(video.VideoChannel.Actor.serverId) |
43 | 43 | ||
44 | return video | 44 | return video |
45 | } catch (err) { | 45 | } catch (err) { |
@@ -53,7 +53,7 @@ async function refreshVideoIfNeeded (options: { | |||
53 | 53 | ||
54 | logger.warn('Cannot refresh video %s.', options.video.url, { err, ...lTags() }) | 54 | logger.warn('Cannot refresh video %s.', options.video.url, { err, ...lTags() }) |
55 | 55 | ||
56 | ActorFollowScoreCache.Instance.addBadServerId(video.VideoChannel.Actor.serverId) | 56 | ActorFollowHealthCache.Instance.addBadServerId(video.VideoChannel.Actor.serverId) |
57 | 57 | ||
58 | // Don't refresh in loop | 58 | // Don't refresh in loop |
59 | await video.setAsRefreshed() | 59 | await video.setAsRefreshed() |