6005-backupLabeler #2276
|
@ -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]);
|
||||||
|
|
|
@ -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 = ?
|
||||||
|
|
Loading…
Reference in New Issue