 
 
   _ensureProductTypeInMemory: (productTypeId) =>
-    @logger.info "ensuring product type id: #{productTypeId}"
     if @_cache.productType[productTypeId]
       Promise.resolve()
     else
-      console.log 'product type not in cache... resolving...'
       productType =
         id: productTypeId
       @_resolveReference(@client.productTypes, 'productType', productType, "name=\"#{productType?.id}\"")

  _processBatches: (products) ->
    batchedList = _.batchList(products, 30) # max parallel elem to process
    Promise.map batchedList, (productsToProcess) =>
      @logger.info 'Ensuring existence of product type in memory.'
      @_ensureProductTypesInMemory(productsToProcess)
      .then =>
        @logger.info 'product types in memory ensured.'
        if @ensureEnums
          @logger.info 'Ensuring existence of enum keys in product type.'
          enumUpdateActions = @_validateEnums(productsToProcess)
          console.log 'enum update actions'
          console.log JSON.stringify(enumUpdateActions, null, 2)
          uniqueEnumUpdateActions = @_filterUniqueUpdateActions(enumUpdateActions)
          @_updateProductType(uniqueEnumUpdateActions)
      .then =>
        @logger.info 'Existence of enum keys in product type ensured.'
        # extract all skus from master variant and variants of all jsons in the batch
        skus = @_extractUniqueSkus(productsToProcess)
        predicate = @_createProductFetchBySkuQueryPredicate(skus)

              @logger.warn "Found more than 1 #{refKey} for #{ref.id}"
            @_cache[refKey][ref.id] = result.body.results[0]
            if refKey is 'productType'
              @_cache[refKey][result.body.results[0].id] = result.body.results[0]
            resolve(result.body.results[0].id)

