aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-17 11:28:08 +0200
committerChocobozzz <me@florianbigard.com>2018-09-17 11:28:33 +0200
commitc07b6041111daa6dd5d611f31e31819db5992ba8 (patch)
treec4b0a64372b59e0d2beda7c5d0b1ff7426cfd734 /server
parent860cfb31e343f2317416da738f7155803ef4fe75 (diff)
downloadPeerTube-c07b6041111daa6dd5d611f31e31819db5992ba8.tar.gz
PeerTube-c07b6041111daa6dd5d611f31e31819db5992ba8.tar.zst
PeerTube-c07b6041111daa6dd5d611f31e31819db5992ba8.zip
Fix checker if we don't have redundancy strategies
Diffstat (limited to 'server')
-rw-r--r--server/initializers/checker.ts8
-rw-r--r--server/initializers/constants.ts2
2 files changed, 5 insertions, 5 deletions
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 () {
52 if (filtered.length !== redundancyVideos.length) { 52 if (filtered.length !== redundancyVideos.length) {
53 return 'Redundancy video entries should have unique strategies' 53 return 'Redundancy video entries should have unique strategies'
54 } 54 }
55 }
56 55
57 const recentlyAddedStrategy = redundancyVideos.find(r => r.strategy === 'recently-added') as RecentlyAddedStrategy 56 const recentlyAddedStrategy = redundancyVideos.find(r => r.strategy === 'recently-added') as RecentlyAddedStrategy
58 if (recentlyAddedStrategy && isNaN(recentlyAddedStrategy.minViews)) { 57 if (recentlyAddedStrategy && isNaN(recentlyAddedStrategy.minViews)) {
59 return 'Min views in recently added strategy is not a number' 58 return 'Min views in recently added strategy is not a number'
59 }
60 } 60 }
61 61
62 return null 62 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) {
660 660
661 CACHE.VIDEO_CAPTIONS.MAX_AGE = 3000 661 CACHE.VIDEO_CAPTIONS.MAX_AGE = 3000
662 MEMOIZE_TTL.OVERVIEWS_SAMPLE = 1 662 MEMOIZE_TTL.OVERVIEWS_SAMPLE = 1
663 ROUTE_CACHE_LIFETIME.OVERVIEWS.VIDEOS = '0' 663 ROUTE_CACHE_LIFETIME.OVERVIEWS.VIDEOS = '0ms'
664} 664}
665 665
666updateWebserverConfig() 666updateWebserverConfig()