diff --git a/modules/worker/back/models/operator.js b/modules/worker/back/models/operator.js index 9652f3763..d46f3d934 100644 --- a/modules/worker/back/models/operator.js +++ b/modules/worker/back/models/operator.js @@ -17,25 +17,18 @@ module.exports = Self => { const {backupPrinterNotificationDelay} = await models.ProductionConfig.findOne(); if (backupPrinterNotificationDelay) { - console.log('operator delay:', - backupPrinterNotificationDelay, - Date.vnNow(), - new Date(Date.vnNow() - (backupPrinterNotificationDelay * 1000)) - ); const notifications = await models.NotificationQueue.find( {where: {created: {gte: new Date(Date.vnNow() - (backupPrinterNotificationDelay * 1000))}, notificationFk: notificationName, status: 'sent' } }); - console.log('notifications: ', notifications); const criteria = {labelerId: labelerFk, sectorId: sectorFk}; const filteredNotifications = notifications.filter(notification => { const paramsObj = JSON.parse(notification.params); return Object.keys(criteria).every(key => criteria[key] === paramsObj?.[key]); }); - console.log('filteredNotifications: ', filteredNotifications); if (filteredNotifications.length >= 1) return; }