Update create-database.js

This commit is contained in:
Aleksandr Statciuk 2022-01-15 18:21:41 +03:00
parent 64b6fbfe36
commit 881d534988

View file

@ -50,7 +50,7 @@ async function loadChannels() {
async function saveToDatabase() { async function saveToDatabase() {
logger.info('Saving to the database...') logger.info('Saving to the database...')
await db.channels.load()
await db.channels.reset() await db.channels.reset()
const chunks = split(_.shuffle(channels), options.maxClusters) const chunks = split(_.shuffle(channels), options.maxClusters)
for (const [i, chunk] of chunks.entries()) { for (const [i, chunk] of chunks.entries()) {