Node.js based forum software built for the modern web
feat: show time info for upgrade scripts
Barış Soner Uşaklı14a6c349c2ff
diff --git a/src/upgrade.js b/src/upgrade.jsindex 36c5ed214e..99b088bb05 100644--- a/src/upgrade.js+++ b/src/upgrade.js@@ -153,6 +153,7 @@ Upgrade.process = async function (files, skipCount) {}// Do the upgrade...+ const upgradeStart = Date.now();try {await scriptExport.method.bind({progress: progress,@@ -161,8 +162,8 @@ Upgrade.process = async function (files, skipCount) {console.error('Error occurred');throw err;}-- process.stdout.write(' OK\n'.green);+ const upgradeDuration = ((Date.now() - upgradeStart) / 1000).toFixed(2);+ process.stdout.write(` OK (${upgradeDuration} seconds)\n`.green);// Record success in schemaLogawait db.sortedSetAdd('schemaLog', Date.now(), path.basename(file, '.js'));