This commit is contained in:
Ralfs 2021-04-11 12:48:34 +03:00
parent 1aaec24536
commit 42f333b57e
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ const runCron = async () => {
}
});
const expiryTime = Date.now() - (1000 * 60 * 15); // 15 Minutes
db.collection('alerts').deleteMany({ tgChatId: { '$exists': false }, timestamp: { '$lt': expiryTime } });
db.collection('alerts').deleteMany({ alertProvider: 'tg', tgChatId: { '$exists': false }, timestamp: { '$lt': expiryTime } });
} catch (e) {
sendLogsToDiscord(null, e);
}