diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-24 14:08:23 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-25 10:07:51 +0100 |
commit | 5a547f69d5dc5867e253f7721513479c754b4f15 (patch) | |
tree | 5ccad0e07d04e24d7a4c0b624a46d3b5a93ebce5 /shared/extra-utils/server | |
parent | 9252a33d115bba85adcfbc18ab3725924642871c (diff) | |
download | PeerTube-5a547f69d5dc5867e253f7721513479c754b4f15.tar.gz PeerTube-5a547f69d5dc5867e253f7721513479c754b4f15.tar.zst PeerTube-5a547f69d5dc5867e253f7721513479c754b4f15.zip |
Support encoding profiles
Diffstat (limited to 'shared/extra-utils/server')
-rw-r--r-- | shared/extra-utils/server/servers.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/shared/extra-utils/server/servers.ts b/shared/extra-utils/server/servers.ts index a647b0eb4..75e79cc41 100644 --- a/shared/extra-utils/server/servers.ts +++ b/shared/extra-utils/server/servers.ts | |||
@@ -104,7 +104,7 @@ function randomRTMP () { | |||
104 | return randomInt(low, high) | 104 | return randomInt(low, high) |
105 | } | 105 | } |
106 | 106 | ||
107 | async function flushAndRunServer (serverNumber: number, configOverride?: Object, args = []) { | 107 | async function flushAndRunServer (serverNumber: number, configOverride?: Object, args = [], silent = true) { |
108 | const parallel = parallelTests() | 108 | const parallel = parallelTests() |
109 | 109 | ||
110 | const internalServerNumber = parallel ? randomServer() : serverNumber | 110 | const internalServerNumber = parallel ? randomServer() : serverNumber |
@@ -133,10 +133,10 @@ async function flushAndRunServer (serverNumber: number, configOverride?: Object, | |||
133 | } | 133 | } |
134 | } | 134 | } |
135 | 135 | ||
136 | return runServer(server, configOverride, args) | 136 | return runServer(server, configOverride, args, silent) |
137 | } | 137 | } |
138 | 138 | ||
139 | async function runServer (server: ServerInfo, configOverrideArg?: any, args = []) { | 139 | async function runServer (server: ServerInfo, configOverrideArg?: any, args = [], silent?: boolean) { |
140 | // These actions are async so we need to be sure that they have both been done | 140 | // These actions are async so we need to be sure that they have both been done |
141 | const serverRunString = { | 141 | const serverRunString = { |
142 | 'Server listening': false | 142 | 'Server listening': false |
@@ -240,7 +240,11 @@ async function runServer (server: ServerInfo, configOverrideArg?: any, args = [] | |||
240 | // If no, there is maybe one thing not already initialized (client/user credentials generation...) | 240 | // If no, there is maybe one thing not already initialized (client/user credentials generation...) |
241 | if (dontContinue === true) return | 241 | if (dontContinue === true) return |
242 | 242 | ||
243 | server.app.stdout.removeListener('data', onStdout) | 243 | if (silent === false) { |
244 | console.log(data.toString()) | ||
245 | } else { | ||
246 | server.app.stdout.removeListener('data', onStdout) | ||
247 | } | ||
244 | 248 | ||
245 | process.on('exit', () => { | 249 | process.on('exit', () => { |
246 | try { | 250 | try { |