From 147638b3ce6ee63d27c469481b0d24a9e9980cb7 Mon Sep 17 00:00:00 2001 From: Wisley Alves Date: Mon, 22 Jul 2024 09:37:42 -0300 Subject: [PATCH] fix(horus-events): test time to import new --- functions/lib/cron-events-horus.js | 4 ++-- functions/lib/integration/imports/utils.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/lib/cron-events-horus.js b/functions/lib/cron-events-horus.js index 4e4cd30..cd80b6c 100644 --- a/functions/lib/cron-events-horus.js +++ b/functions/lib/cron-events-horus.js @@ -44,7 +44,7 @@ const checkProductsImports = async ({ appSdk, storeId }, horus, opts) => { storeId, url: '/items.json', data: { - // size: codigoItems.length + 10 // 10 for products heven't ERP + size: codigoItems.length + 50 // 50 for products heven't ERP } }).then(({ data }) => { const { hits: { hits } } = data @@ -60,7 +60,7 @@ const checkProductsImports = async ({ appSdk, storeId }, horus, opts) => { }) .catch(() => []) - console.log('>> new ', JSON.stringify(newProducts), newProducts.length) + console.log('>> new ', newProducts.length) const productsQueue = opts?.appData?.importation.products || [] const products = productsQueue.concat(newProducts || []) console.log('>> ', JSON.stringify(products)) diff --git a/functions/lib/integration/imports/utils.js b/functions/lib/integration/imports/utils.js index b45f4bc..15bf815 100644 --- a/functions/lib/integration/imports/utils.js +++ b/functions/lib/integration/imports/utils.js @@ -180,7 +180,7 @@ const getAllItemsHorusToImport = async (horus, storeId, opts) => { let offset = 0 const limit = 50 - const init = Date.now() + // const init = Date.now() const listItemsToImport = [] const codCaract = opts?.appData?.code_characteristic || 5 const codTpoCaract = opts?.appData?.code_type_characteristic || 3