From 95ba14bbdd351aeb27971fa7e41e8aba8305615b Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sun, 13 Feb 2022 04:48:29 +0300 Subject: [PATCH] Update update.js --- scripts/commands/database/update.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/commands/database/update.js b/scripts/commands/database/update.js index a0555c0ee7..55d768bebd 100644 --- a/scripts/commands/database/update.js +++ b/scripts/commands/database/update.js @@ -98,6 +98,8 @@ async function updateStreams(items = [], results = {}, origins = {}) { } } + if (stream.changed) updated++ + output.push(stream.data()) } @@ -107,7 +109,7 @@ async function updateStreams(items = [], results = {}, origins = {}) { } async function updateDatabase(streams = []) { - logger.info('updating database...') + logger.info('saving to database...') for (const stream of streams) { await db.streams.update({ _id: stream._id }, stream)