diff options
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r-- | server/initializers/constants.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 03424ffb8..947cbda28 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -601,7 +601,6 @@ const MEMOIZE_TTL = { | |||
601 | 601 | ||
602 | const REDUNDANCY = { | 602 | const REDUNDANCY = { |
603 | VIDEOS: { | 603 | VIDEOS: { |
604 | EXPIRES_AFTER_MS: 48 * 3600 * 1000, // 2 days | ||
605 | RANDOMIZED_FACTOR: 5 | 604 | RANDOMIZED_FACTOR: 5 |
606 | } | 605 | } |
607 | } | 606 | } |
@@ -750,10 +749,16 @@ function updateWebserverConfig () { | |||
750 | CONFIG.WEBSERVER.HOST = sanitizeHost(CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT, REMOTE_SCHEME.HTTP) | 749 | CONFIG.WEBSERVER.HOST = sanitizeHost(CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT, REMOTE_SCHEME.HTTP) |
751 | } | 750 | } |
752 | 751 | ||
753 | function buildVideosRedundancy (objs: VideosRedundancy[]): VideosRedundancy[] { | 752 | function buildVideosRedundancy (objs: any[]): VideosRedundancy[] { |
754 | if (!objs) return [] | 753 | if (!objs) return [] |
755 | 754 | ||
756 | return objs.map(obj => Object.assign(obj, { size: bytes.parse(obj.size) })) | 755 | return objs.map(obj => { |
756 | return Object.assign(obj, { | ||
757 | minLifetime: parseDuration(obj.min_lifetime), | ||
758 | size: bytes.parse(obj.size), | ||
759 | minViews: obj.min_views | ||
760 | }) | ||
761 | }) | ||
757 | } | 762 | } |
758 | 763 | ||
759 | function buildLanguages () { | 764 | function buildLanguages () { |