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",