From 80075a647170eee3aa752683bba4b6d39bee22fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20S=C3=A1nchez?= Date: Mon, 13 Jul 2020 14:46:00 +0200 Subject: [PATCH] Added limit --- modules/item/back/methods/item-image-queue/download.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/item/back/methods/item-image-queue/download.js b/modules/item/back/methods/item-image-queue/download.js index 91ac59795..c9e68d719 100644 --- a/modules/item/back/methods/item-image-queue/download.js +++ b/modules/item/back/methods/item-image-queue/download.js @@ -22,9 +22,7 @@ module.exports = Self => { let filePath; try { const imageQueue = await Self.find({ - where: { - itemFk: 410421 - } + limit: 3 }); // const rootPath = 'C:\\Users\\jsanc\\Desktop\\images'; @@ -44,7 +42,7 @@ module.exports = Self => { response.pipe(file); await models.Image.register('catalog', fileName, filePath); - // await image.destroy(); + await image.destroy(); }); }