Skip to content

Commit

Permalink
fix(horus-events): test time to import new
Browse files Browse the repository at this point in the history
  • Loading branch information
wisley7l committed Jul 22, 2024
1 parent 2263bca commit 147638b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions functions/lib/cron-events-horus.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion functions/lib/integration/imports/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 147638b

Please sign in to comment.