Merge pull request #677 from galaxycard/bugfix/clearQueue
Clear old message by datetime, not by timestamp)
This commit is contained in:
commit
ebb6c2ff74
1 changed files with 1 additions and 2 deletions
|
@ -592,7 +592,7 @@ async function scheduleQueued() {
|
||||||
const expiredCount = await knex('queued')
|
const expiredCount = await knex('queued')
|
||||||
.whereNotIn('send_configuration', sendConfigurationsIdsInProcessing)
|
.whereNotIn('send_configuration', sendConfigurationsIdsInProcessing)
|
||||||
.where('type', type)
|
.where('type', type)
|
||||||
.where('created', '<', expirationThreshold.threshold)
|
.where('created', '<', new Date(expirationThreshold.threshold))
|
||||||
.del();
|
.del();
|
||||||
|
|
||||||
if (expiredCount) {
|
if (expiredCount) {
|
||||||
|
@ -731,4 +731,3 @@ async function init() {
|
||||||
|
|
||||||
// noinspection JSIgnoredPromiseFromCall
|
// noinspection JSIgnoredPromiseFromCall
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue