Clear old message by datetime, not by timestamp)

This commit is contained in:
amit.kumar 2019-08-15 13:23:54 +05:30
parent 71737fa656
commit 8bda0c05c0

View file

@ -592,7 +592,7 @@ async function scheduleQueued() {
const expiredCount = await knex('queued')
.whereNotIn('send_configuration', sendConfigurationsIdsInProcessing)
.where('type', type)
.where('created', '<', expirationThreshold.threshold)
.where('created', '<', new Date(expirationThreshold.threshold))
.del();
if (expiredCount) {
@ -731,4 +731,3 @@ async function init() {
// noinspection JSIgnoredPromiseFromCall
init();