diff --git a/package.json b/package.json index c143b1c..d7dee28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rss-telegram-bot", - "version": "1.0.7", + "version": "1.0.8", "main": "lib/index.js", "author": "Fabian Stamm ", "license": "MIT", diff --git a/src/index.ts b/src/index.ts index e07429c..3108721 100644 --- a/src/index.ts +++ b/src/index.ts @@ -218,7 +218,9 @@ Promise.resolve().then(async () => { } function checkAll() { - Database.getAll().map(feed => checkFeed(feed).catch(err => Logging.error(err))); + Database.getAll().map(feed => checkFeed(feed).catch(err => Logging.error(err)).finally(() => { + db.write(); + })); } setInterval(() => {