aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/checker-after-init.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-19 16:33:40 +0100
committerChocobozzz <me@florianbigard.com>2019-03-19 16:33:40 +0100
commitd85798c4e7b18f3b464fa819ffc5bec06137e3e9 (patch)
tree56fe546d0d237676c3f9b462bba12156e5d82225 /server/initializers/checker-after-init.ts
parent2ba92871319d7af63472c1380664a9f9eeb1c690 (diff)
downloadPeerTube-d85798c4e7b18f3b464fa819ffc5bec06137e3e9.tar.gz
PeerTube-d85798c4e7b18f3b464fa819ffc5bec06137e3e9.tar.zst
PeerTube-d85798c4e7b18f3b464fa819ffc5bec06137e3e9.zip
Better videos redundancy config error handling
Diffstat (limited to 'server/initializers/checker-after-init.ts')
-rw-r--r--server/initializers/checker-after-init.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts
index 53124f9ec..a99dbba37 100644
--- a/server/initializers/checker-after-init.ts
+++ b/server/initializers/checker-after-init.ts
@@ -61,6 +61,7 @@ function checkConfig () {
61 61
62 // Redundancies 62 // Redundancies
63 const redundancyVideos = CONFIG.REDUNDANCY.VIDEOS.STRATEGIES 63 const redundancyVideos = CONFIG.REDUNDANCY.VIDEOS.STRATEGIES
64 console.log(redundancyVideos)
64 if (isArray(redundancyVideos)) { 65 if (isArray(redundancyVideos)) {
65 const available = [ 'most-views', 'trending', 'recently-added' ] 66 const available = [ 'most-views', 'trending', 'recently-added' ]
66 for (const r of redundancyVideos) { 67 for (const r of redundancyVideos) {
@@ -83,6 +84,8 @@ function checkConfig () {
83 if (recentlyAddedStrategy && isNaN(recentlyAddedStrategy.minViews)) { 84 if (recentlyAddedStrategy && isNaN(recentlyAddedStrategy.minViews)) {
84 return 'Min views in recently added strategy is not a number' 85 return 'Min views in recently added strategy is not a number'
85 } 86 }
87 } else {
88 return 'Videos redundancy should be an array (you must uncomment lines containing - too)'
86 } 89 }
87 90
88 // Check storage directory locations 91 // Check storage directory locations