diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-23 10:53:16 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-23 10:53:16 +0200 |
commit | 64324ac646b0938e35cd88771492623b640bd0d8 (patch) | |
tree | 7d702cf4f79d5a39edcdf244d961f059d08d2105 /server/initializers | |
parent | 2c2befaacaa7063df0d4557b71c187ee168a8eb6 (diff) | |
parent | b6898035bfc5ba60ec54f7e61ff832e5e2ac30eb (diff) | |
download | PeerTube-64324ac646b0938e35cd88771492623b640bd0d8.tar.gz PeerTube-64324ac646b0938e35cd88771492623b640bd0d8.tar.zst PeerTube-64324ac646b0938e35cd88771492623b640bd0d8.zip |
Merge branch 'release/4.2.0' into develop
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 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 () { | |||
1169 | function generateContentHash () { | 1169 | function generateContentHash () { |
1170 | return randomBytes(20).toString('hex') | 1170 | return randomBytes(20).toString('hex') |
1171 | } | 1171 | } |
1172 | |||
1173 | function getIntEnv (path: string) { | ||
1174 | if (process.env[path]) return parseInt(process.env[path]) | ||
1175 | |||
1176 | return undefined | ||
1177 | } | ||