Added timestamp to watch mode status log.

This commit is contained in:
DebaucheryLibrarian 2024-09-11 05:16:56 +02:00
parent c83421ca41
commit c4afd398dc
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ const config = require('config');
const Snoowrap = require('snoowrap');
const exiftool = require('node-exiftool');
const exiftoolBin = require('dist-exiftool');
const { format } = require('date-fns');
require('array.prototype.flatten').shim();
@ -40,7 +41,7 @@ function fetchSavePosts(userPosts, ep) {
async function initApp() {
function watch() {
console.log(`Watch-mode enabled, checking for new posts ${config.fetch.watch.interval} minutes from now.`);
console.log(`[${format(new Date(), 'YYYY-MM-DD HH:mm:ss')}] Watch-mode enabled, checking for new posts ${config.fetch.watch.interval} minutes from now.`);
setTimeout(initApp, Math.ceil(config.fetch.watch.interval) * 1000 * 60);
}