From 5880bf9020d35581e8e10f897381abf5933bd59a Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Wed, 10 Aug 2022 18:50:57 +0100 Subject: [PATCH] wrangler: add current date to process indicator. There's a bug that causes it to hang, but we don't know why --- rainfallwrangler/src/lib/record/jsonl_to_tf.mjs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rainfallwrangler/src/lib/record/jsonl_to_tf.mjs b/rainfallwrangler/src/lib/record/jsonl_to_tf.mjs index c34f740..7f19fba 100644 --- a/rainfallwrangler/src/lib/record/jsonl_to_tf.mjs +++ b/rainfallwrangler/src/lib/record/jsonl_to_tf.mjs @@ -23,7 +23,7 @@ export default async function(dirpath_source, dirpath_target) { let time_start = new Date(), lines_processed = 0, files_processed = 0; const update_progress_force = () => { - process.stdout.write(`${files_processed}/${lines_processed} files/lines complete | ${((new Date() - time_start) / lines_processed).toFixed(3)} lines/sec | ${((files_processed / files.length)*100).toFixed(2)}% complete\r`); + process.stdout.write(`${files_processed}/${lines_processed} files/lines complete | ${((new Date() - time_start) / lines_processed).toFixed(3)} lines/sec | ${((files_processed / files.length)*100).toFixed(2)}% complete | now: ${new Date().toISOString()}\r`); }; const update_progress = debounce(update_progress_force, 2000); @@ -39,7 +39,6 @@ export default async function(dirpath_source, dirpath_target) { update_progress(); } files_processed++; - l.info(`DEBUG lines_done`, lines_done); const time_per_line = (new Date() - time_start) / (lines_done === 0 ? 1 : lines_done); l.log(`converted ${filename}: ${lines_done} lines @ ${pretty_ms(time_per_line)}/line`);