feat(delay): refs #6005 add new restriction
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Pablo Natek 2024-03-06 14:51:34 +01:00
parent 5e97f820a2
commit a44359762b
2 changed files with 2 additions and 4 deletions

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 = ?