From 1b5e2d72900c8ceaf76940b72839d3c424ac96e8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 23 Nov 2018 11:06:10 +0100 Subject: Optimize config endpoint --- server/tools/peertube-repl.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'server/tools') diff --git a/server/tools/peertube-repl.ts b/server/tools/peertube-repl.ts index 6800ff8ab..04d8b95a3 100644 --- a/server/tools/peertube-repl.ts +++ b/server/tools/peertube-repl.ts @@ -20,14 +20,10 @@ import * as signupUtils from '../helpers/signup' import * as utils from '../helpers/utils' import * as YoutubeDLUtils from '../helpers/youtube-dl' -let versionCommitHash - const start = async () => { await initDatabaseModels(true) - await utils.getVersion().then((data) => { - versionCommitHash = data - }) + const versionCommitHash = await utils.getServerCommit() const initContext = (replServer) => { return (context) => { @@ -59,6 +55,7 @@ const start = async () => { initContext(replServer)(replServer.context) replServer.on('reset', initContext(replServer)) + replServer.on('exit', () => process.exit()) const resetCommand = { help: 'Reset REPL', -- cgit v1.2.3