From 76fbc2960728ee9f6b7058e03ace0064b9302644 Mon Sep 17 00:00:00 2001 From: CeBe Date: Wed, 6 Mar 2013 22:36:00 +0100 Subject: [PATCH] improved output for importSqlFile --- bin/importSqlFile.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/importSqlFile.js b/bin/importSqlFile.js index b43a0622..bdc2c434 100644 --- a/bin/importSqlFile.js +++ b/bin/importSqlFile.js @@ -24,6 +24,7 @@ require("ep_etherpad-lite/node_modules/npm").load({}, function(er,npm) { var count = lines.length; var keyNo = 0; + process.stdout.write("Start importing " + count + " keys...\n"); lines.forEach(function(l) { if (l.substr(0, 27) == "REPLACE INTO store VALUES (") { var pos = l.indexOf("', '"); @@ -32,9 +33,8 @@ require("ep_etherpad-lite/node_modules/npm").load({}, function(er,npm) { value = value.substr(0, value.length - 3); db.db.set(key, value, null); keyNo++; - process.stdout.write("."); - if (keyNo % 100 == 0) { - console.log(" " + keyNo + "/" + count); + if (keyNo % 1000 == 0) { + process.stdout.write(" " + keyNo + "/" + count); } } });