- When
product-clean-up command runs, it produces a CSV file with all the deleted and non-deleted products as part of the clean-up. It should only contain the list of those successfully deleted. Otherwise the CSV is not useful for rollback/reimports.
- The file which contains the reasons from Vend as to why some product deletions were "refused" ... does not always print out.
This code-block is not promise-capable:
.then(function deletionResults(deleteIt){
if(deleteIt.status != "success"){
unsuccessful++;
fs.appendFileSync(defaultOutputDirectory+"nonDeletable.txt",unsuccessful+". Product : "+ singleProductToDelete.name +" Reason : "+ deleteIt.details+"\n",'utf8');
}
else {
successful++;
}
})
It uses code like fs.appendFileSync which is problematic and simply adding return Promise.resolve(); at the end of that block might not fix anything. Needs testing and rewrite.
product-clean-upcommand runs, it produces a CSV file with all the deleted and non-deleted products as part of the clean-up. It should only contain the list of those successfully deleted. Otherwise the CSV is not useful for rollback/reimports.This code-block is not promise-capable:
It uses code like
fs.appendFileSyncwhich is problematic and simply addingreturn Promise.resolve();at the end of that block might not fix anything. Needs testing and rewrite.