INNER CODE UNIT · JavaScript

fullReindex

vuestorefront/mage2vuestorefront · src/cli.js:293

function fullReindex(adapterName, removeNonExistent, partitions, partitionSize, initQueue, skus, extendedCategories, generateUniqueUrlKeys) {
  // The sequence is important because commands operate on some cache resources - especially for product/category assignments
  Promise.all([
    reindexAttributes(adapterName, removeNonExistent), // 0. It stores attributes in redis cache
    reindexTaxRules(adapterName, removeNonExistent), // 1. It indexes the taxRules
    reindexCategories(adapterName, removeNonExistent, extendedCategories, generateUniqueUrlKeys), //2. It stores categories in redis cache
    reindexProductCategories(adapterName) // 3. It stores product/cateogry links in redis cache
  ]).then((results) => {
    logger.info('Starting full products reindex!');
    reindexProducts(adapterName, removeNonExistent, partitions, partitionSize, initQueue, skus); //4. It indexes all the products
  }).catch((err) => {
    logger.error(err);
    process.exit(1)
  });
}

/**
 * Run worker listening to "product" command on KUE queue

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…