diff options
Diffstat (limited to 'server/initializers')
-rw-r--r-- | server/initializers/constants.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 9201f95b3..6c6628d28 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -865,7 +865,7 @@ if (isTestInstance() === true) { | |||
865 | 865 | ||
866 | PLUGIN_EXTERNAL_AUTH_TOKEN_LIFETIME = 5000 | 866 | PLUGIN_EXTERNAL_AUTH_TOKEN_LIFETIME = 5000 |
867 | 867 | ||
868 | VIDEO_LIVE.CLEANUP_DELAY = 5000 | 868 | VIDEO_LIVE.CLEANUP_DELAY = getIntEnv('PEERTUBE_TEST_CONSTANTS.VIDEO_LIVE.CLEANUP_DELAY') ?? 5000 |
869 | VIDEO_LIVE.SEGMENT_TIME_SECONDS.DEFAULT_LATENCY = 2 | 869 | VIDEO_LIVE.SEGMENT_TIME_SECONDS.DEFAULT_LATENCY = 2 |
870 | VIDEO_LIVE.SEGMENT_TIME_SECONDS.SMALL_LATENCY = 1 | 870 | VIDEO_LIVE.SEGMENT_TIME_SECONDS.SMALL_LATENCY = 1 |
871 | VIDEO_LIVE.EDGE_LIVE_DELAY_SEGMENTS_NOTIFICATION = 1 | 871 | VIDEO_LIVE.EDGE_LIVE_DELAY_SEGMENTS_NOTIFICATION = 1 |
@@ -1174,3 +1174,9 @@ function buildLanguages () { | |||
1174 | function generateContentHash () { | 1174 | function generateContentHash () { |
1175 | return randomBytes(20).toString('hex') | 1175 | return randomBytes(20).toString('hex') |
1176 | } | 1176 | } |
1177 | |||
1178 | function getIntEnv (path: string) { | ||
1179 | if (process.env[path]) return parseInt(process.env[path]) | ||
1180 | |||
1181 | return undefined | ||
1182 | } | ||