build(operator): console.log
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
d27bbd9a8f
commit
35ae728e81
|
@ -17,18 +17,25 @@ 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;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "salix-back",
|
||||
"version": "24.22.7",
|
||||
"version": "24.22.8",
|
||||
"author": "Verdnatura Levante SL",
|
||||
"description": "Salix backend",
|
||||
"license": "GPL-3.0",
|
||||
|
|
Loading…
Reference in New Issue