Fix checker if we don't have redundancy strategies
This commit is contained in:
parent
860cfb31e3
commit
c07b604111
|
@ -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
|
||||
|
||||
|
|
|
@ -52,12 +52,12 @@ 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'
|
||||
}
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue