import_quotes.js
function checkFinished() {
	if ((import_count + dupe_count) % 100 === 0) {
		console.log('Imported', import_count + dupe_count, '/', quote_count);
	}

	// Once we're done, show the stats and tell the bot to shutdown.
	// Since the bot is fully async-aware itself, it won't shut down unless explicitly told to.
	if (finished_reading && quote_count === import_count + dupe_count) {
		console.log('\nQuotes in file:', quote_count);
		console.log('Quotes imported:', import_count);
		console.log('Duplicate quotes:', dupe_count);
		bot.shutdown();
	}
}
function checkFinished() {
	if ((import_count + dupe_count) % 100 === 0) {
		console.log('Imported', import_count + dupe_count, '/', quote_count);
	}

	// Once we're done, show the stats and tell the bot to shutdown.
	// Since the bot is fully async-aware itself, it won't shut down unless explicitly told to.
	if (finished_reading && quote_count === import_count + dupe_count) {
		console.log('\nQuotes in file:', quote_count);
		console.log('Quotes imported:', import_count);
		console.log('Duplicate quotes:', dupe_count);
		bot.shutdown();
	}
}
function checkFinished ( ) { if ( ( import_count + dupe_count ) % 100 === 0 ) { console . log ( 'Imported' , import_count + dupe_count , '/' , quote_count ) ; } // Once we're done, show the stats and tell the bot to shutdown. // Since the bot is fully async-aware itself, it won't shut down unless explicitly told to. if ( finished_reading && quote_count === import_count + dupe_count ) { console . log ( '\nQuotes in file:' , quote_count ) ; console . log ( 'Quotes imported:' , import_count ) ; console . log ( 'Duplicate quotes:' , dupe_count ) ; bot . shutdown ( ) ; } }
Check if all async DB calls have finished. Output if so.
Check if all async DB calls have finished . Output if so .