From c75664f694419d7d4da0ccb52fcbd7c87a997f4a Mon Sep 17 00:00:00 2001 From: Joseph Huckaby Date: Thu, 19 Dec 2019 22:06:19 -0800 Subject: [PATCH] Version 0.8.38 Fixes #246 -- thanks @alexpanas! --- bin/storage-cli.js | 9 ++++++--- package.json | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/storage-cli.js b/bin/storage-cli.js index 6ce4efff..eaf63c65 100755 --- a/bin/storage-cli.js +++ b/bin/storage-cli.js @@ -595,9 +595,12 @@ function import_data(file) { rl.on('close', function() { // end of input stream var complete = function() { - print( "\nImport complete. " + count + " records imported.\nExiting.\n\n" ); - - storage.shutdown( function() { process.exit(0); } ); + // finally, delete state so cronicle recreates it + storage.delete( 'global/state', function(err) { + // ignore error here, as state may not exist yet + print( "\nImport complete. " + count + " records imported.\nExiting.\n\n" ); + storage.shutdown( function() { process.exit(0); } ); + }); }; // fire complete on queue drain diff --git a/package.json b/package.json index e470e497..12fbe140 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Cronicle", - "version": "0.8.37", + "version": "0.8.38", "description": "A simple, distributed task scheduler and runner with a web based UI.", "author": "Joseph Huckaby ", "homepage": "https://github.com/jhuckaby/Cronicle",