aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/constants.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 0d7e7077d..5329d75f8 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -861,7 +861,7 @@ if (isTestInstance() === true && process.env.PRODUCTION_CONSTANTS !== 'true') {
861 861
862 PLUGIN_EXTERNAL_AUTH_TOKEN_LIFETIME = 5000 862 PLUGIN_EXTERNAL_AUTH_TOKEN_LIFETIME = 5000
863 863
864 VIDEO_LIVE.CLEANUP_DELAY = 5000 864 VIDEO_LIVE.CLEANUP_DELAY = getIntEnv('PEERTUBE_TEST_CONSTANTS.VIDEO_LIVE.CLEANUP_DELAY') ?? 5000
865 VIDEO_LIVE.SEGMENT_TIME_SECONDS.DEFAULT_LATENCY = 2 865 VIDEO_LIVE.SEGMENT_TIME_SECONDS.DEFAULT_LATENCY = 2
866 VIDEO_LIVE.SEGMENT_TIME_SECONDS.SMALL_LATENCY = 1 866 VIDEO_LIVE.SEGMENT_TIME_SECONDS.SMALL_LATENCY = 1
867 VIDEO_LIVE.EDGE_LIVE_DELAY_SEGMENTS_NOTIFICATION = 1 867 VIDEO_LIVE.EDGE_LIVE_DELAY_SEGMENTS_NOTIFICATION = 1
@@ -1169,3 +1169,9 @@ function buildLanguages () {
1169function generateContentHash () { 1169function generateContentHash () {
1170 return randomBytes(20).toString('hex') 1170 return randomBytes(20).toString('hex')
1171} 1171}
1172
1173function getIntEnv (path: string) {
1174 if (process.env[path]) return parseInt(process.env[path])
1175
1176 return undefined
1177}