6005-backupLabeler #2276

Merged
pablone merged 50 commits from 6005-backupLabeler into dev 2024-04-12 07:12:54 +00:00
2 changed files with 2 additions and 4 deletions
Showing only changes of commit a44359762b - Show all commits

View File

@ -5,10 +5,8 @@ const name = 'backup-printer-selected';
module.exports = { module.exports = {
name: name, name: name,
async serverPrefetch() { async serverPrefetch() {
const notifications1 = await this.rawSqlFromDef('previousNotificationscopy', [name]);
console.log('notifications: ', notifications1);
const notifications = await this.rawSqlFromDef('previousNotifications', [name]); const notifications = await this.rawSqlFromDef('previousNotifications', [name]);
if (!notifications.length && checkDuplicates(notifications, this.labelerId, this.sectorId)) if (!notifications.length || checkDuplicates(notifications, this.labelerId, this.sectorId))
throw new Error('Previous notification sended with the same parameters'); throw new Error('Previous notification sended with the same parameters');
this.sector = await this.findOneFromDef('sector', [this.sectorId]); this.sector = await this.findOneFromDef('sector', [this.sectorId]);

View File

@ -1,4 +1,4 @@
SELECT nq.params SELECT nq.params, created, status
FROM util.notificationQueue nq FROM util.notificationQueue nq
JOIN util.notification n ON n.name = nq.notificationFk JOIN util.notification n ON n.name = nq.notificationFk
WHERE n.name = ? WHERE n.name = ?