What a fantastic addition. That is very important for us. However, I have a question. Think of an invoice. We want the invoice lines (dozens) to be processed asynchronously. After the loop, the invoice lines need to be merged into one invoice. How can we ensure that after the loop, all the ‘background tasks’ have been completed before we proceed with the function?
That awesome, however, how can I get the response result of those async functions? Maybe if something fails, I'd like to track the status of those async functions.
Hi there! For error handling and tracking failures, you can implement a try/catch block. While this isn't specific to async functions, it's a good practice for handling errors in general. docs.xano.com/working-with-data/functions/utility-functions#try-catch
Post Process only executes after your API returns a response. Async functions allow you to continue performing other business logic while the async function runs in the background using dedicated resources.
Couldn't be more happy with the updates you guys keep pushing!!
Love this feature, and love Chris' videos, he explains things in a really engaging way!
THank you Chris for your videos it is always calm and well explain, perfect for learning. Keep going 🚀
What a fantastic addition. That is very important for us. However, I have a question. Think of an invoice. We want the invoice lines (dozens) to be processed asynchronously. After the loop, the invoice lines need to be merged into one invoice. How can we ensure that after the loop, all the ‘background tasks’ have been completed before we proceed with the function?
There is a new await statement in the utility group.
That awesome, however, how can I get the response result of those async functions? Maybe if something fails, I'd like to track the status of those async functions.
Hi there! For error handling and tracking failures, you can implement a try/catch block. While this isn't specific to async functions, it's a good practice for handling errors in general. docs.xano.com/working-with-data/functions/utility-functions#try-catch
there is an async await function in the utility group. That will wait for the result.
How does this compare to post process function?
Post Process only executes after your API returns a response. Async functions allow you to continue performing other business logic while the async function runs in the background using dedicated resources.