diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-12 11:08:20 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-12 11:08:30 +0100 |
commit | a9cd881bf8837b79ab06696f2140e20cb25af558 (patch) | |
tree | 3d5b0d6df2b60aa36c0b3100189dc14f2e47ecc3 | |
parent | 8db19c959e437521db195e3cce96cb4386ed51c1 (diff) | |
download | PeerTube-a9cd881bf8837b79ab06696f2140e20cb25af558.tar.gz PeerTube-a9cd881bf8837b79ab06696f2140e20cb25af558.tar.zst PeerTube-a9cd881bf8837b79ab06696f2140e20cb25af558.zip |
Add benchmark startup option for server
-rw-r--r-- | server.ts | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -136,6 +136,7 @@ import { VideoViews } from '@server/lib/video-views' | |||
136 | cli | 136 | cli |
137 | .option('--no-client', 'Start PeerTube without client interface') | 137 | .option('--no-client', 'Start PeerTube without client interface') |
138 | .option('--no-plugins', 'Start PeerTube without plugins/themes enabled') | 138 | .option('--no-plugins', 'Start PeerTube without plugins/themes enabled') |
139 | .option('--benchmark-startup', 'Automatically stop server when initialized') | ||
139 | .parse(process.argv) | 140 | .parse(process.argv) |
140 | 141 | ||
141 | // ----------- App ----------- | 142 | // ----------- App ----------- |
@@ -324,6 +325,8 @@ async function startApplication () { | |||
324 | logger.info('Web server: %s', WEBSERVER.URL) | 325 | logger.info('Web server: %s', WEBSERVER.URL) |
325 | 326 | ||
326 | Hooks.runAction('action:application.listening') | 327 | Hooks.runAction('action:application.listening') |
328 | |||
329 | if (cliOptions['benchmarkStartup']) process.exit(0) | ||
327 | }) | 330 | }) |
328 | 331 | ||
329 | process.on('exit', () => { | 332 | process.on('exit', () => { |