November 20, 2021 by Admin
You need to resolve the capacity issue.
What should you do?
- Convert the trigger on the Azure Function to an Azure Blob storage trigger
- Ensure that the consumption plan is configured correctly to allow scaling
- Move the Azure Function to a dedicated App Service Plan
- Update the loop starting on line PC09 to process items in parallel
If you want to read the files in parallel, you cannot use forEach. Each of the async callback function calls does return a promise. You can await the array of promises that you’ll get with Promise.all.
Scenario: Capacity issue: During busy periods, employees report long delays between the time they upload the receipt and when it appears in the web application.