Fix checker if we don't have redundancy strategies
This commit is contained in:
parent
860cfb31e3
commit
c07b604111
|
@ -24,13 +24,13 @@ log:
|
||||||
redundancy:
|
redundancy:
|
||||||
videos:
|
videos:
|
||||||
-
|
-
|
||||||
size: '100KB'
|
size: '10MB'
|
||||||
strategy: 'most-views'
|
strategy: 'most-views'
|
||||||
-
|
-
|
||||||
size: '100KB'
|
size: '10MB'
|
||||||
strategy: 'trending'
|
strategy: 'trending'
|
||||||
-
|
-
|
||||||
size: '100KB'
|
size: '10MB'
|
||||||
strategy: 'recently-added'
|
strategy: 'recently-added'
|
||||||
minViews: 10
|
minViews: 10
|
||||||
|
|
||||||
|
|
|
@ -52,11 +52,11 @@ function checkConfig () {
|
||||||
if (filtered.length !== redundancyVideos.length) {
|
if (filtered.length !== redundancyVideos.length) {
|
||||||
return 'Redundancy video entries should have unique strategies'
|
return 'Redundancy video entries should have unique strategies'
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const recentlyAddedStrategy = redundancyVideos.find(r => r.strategy === 'recently-added') as RecentlyAddedStrategy
|
const recentlyAddedStrategy = redundancyVideos.find(r => r.strategy === 'recently-added') as RecentlyAddedStrategy
|
||||||
if (recentlyAddedStrategy && isNaN(recentlyAddedStrategy.minViews)) {
|
if (recentlyAddedStrategy && isNaN(recentlyAddedStrategy.minViews)) {
|
||||||
return 'Min views in recently added strategy is not a number'
|
return 'Min views in recently added strategy is not a number'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null
|
return null
|
||||||
|
|
|
@ -660,7 +660,7 @@ if (isTestInstance() === true) {
|
||||||
|
|
||||||
CACHE.VIDEO_CAPTIONS.MAX_AGE = 3000
|
CACHE.VIDEO_CAPTIONS.MAX_AGE = 3000
|
||||||
MEMOIZE_TTL.OVERVIEWS_SAMPLE = 1
|
MEMOIZE_TTL.OVERVIEWS_SAMPLE = 1
|
||||||
ROUTE_CACHE_LIFETIME.OVERVIEWS.VIDEOS = '0'
|
ROUTE_CACHE_LIFETIME.OVERVIEWS.VIDEOS = '0ms'
|
||||||
}
|
}
|
||||||
|
|
||||||
updateWebserverConfig()
|
updateWebserverConfig()
|
||||||
|
|
Loading…
Reference in New Issue