From c07b6041111daa6dd5d611f31e31819db5992ba8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Sep 2018 11:28:08 +0200 Subject: Fix checker if we don't have redundancy strategies --- config/test.yaml | 6 +++--- server/initializers/checker.ts | 8 ++++---- server/initializers/constants.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/test.yaml b/config/test.yaml index 517fc7449..16113211e 100644 --- a/config/test.yaml +++ b/config/test.yaml @@ -24,13 +24,13 @@ log: redundancy: videos: - - size: '100KB' + size: '10MB' strategy: 'most-views' - - size: '100KB' + size: '10MB' strategy: 'trending' - - size: '100KB' + size: '10MB' strategy: 'recently-added' minViews: 10 diff --git a/server/initializers/checker.ts b/server/initializers/checker.ts index 29f4f3036..b9dc1e725 100644 --- a/server/initializers/checker.ts +++ b/server/initializers/checker.ts @@ -52,11 +52,11 @@ function checkConfig () { if (filtered.length !== redundancyVideos.length) { return 'Redundancy video entries should have unique strategies' } - } - const recentlyAddedStrategy = redundancyVideos.find(r => r.strategy === 'recently-added') as RecentlyAddedStrategy - if (recentlyAddedStrategy && isNaN(recentlyAddedStrategy.minViews)) { - return 'Min views in recently added strategy is not a number' + const recentlyAddedStrategy = redundancyVideos.find(r => r.strategy === 'recently-added') as RecentlyAddedStrategy + if (recentlyAddedStrategy && isNaN(recentlyAddedStrategy.minViews)) { + return 'Min views in recently added strategy is not a number' + } } return null diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 02363352e..fa9093918 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -660,7 +660,7 @@ if (isTestInstance() === true) { CACHE.VIDEO_CAPTIONS.MAX_AGE = 3000 MEMOIZE_TTL.OVERVIEWS_SAMPLE = 1 - ROUTE_CACHE_LIFETIME.OVERVIEWS.VIDEOS = '0' + ROUTE_CACHE_LIFETIME.OVERVIEWS.VIDEOS = '0ms' } updateWebserverConfig() -- cgit v1.2.3