Hi,
I am wondering if a cloud function will exit early if I don't use await on a nested async function that (in this case) runs a firebase transaction?
The docs say that cloud functions won't end until all promises have returned something... So in theory just calling an async function (if I understand correctly async functions are wrapped in a promise by default) will always return a promise which means, even if I don't use await, the main function should not end until the async functions that are called inside of it return something...Regardless of whether or not await was used.
Can anyone confirm if this is correct?
I've actually tested it and it works as expected, but I am not sure if that's only because the transactions run so fast they are done before the main function terminates and if for whatever reason the transaction is running slow one day will it be cancelled before it can run due to the parent function completing.