From the documentation its not clear since documentation mentions ASYNC boolean is set to false by default and also says "Once endpoint is called, your function execution process will start asynchronously"
What does it do and how does it work if I want my functions to run asynchronously ?
Summary
The user is asking for clarification on the ASYNC flag in the CreateExecution function. They mention that setting it to false causes function failures. The user wants to know what happens if an instance of the function is already running and how to handle immediate execution. Another user responds that synchronous executions run concurrently. The user confirms their understanding that setting ASYNC to false starts the function execution immediately. Another user explains that asynchronous execution means the function is queued and executed later, so the response will show a status of waiting and no logs or errors. The documentation is unclear on this.
Solution: The ASYNC flag in CreateExecution determines whether the function
Drake
Dec 9, 2023, 22:03
An asynchronous execution means it's not executed right away. It gets queued and executed later. This means the response of create execution will have a status of waiting and no response/logs/error
punti_z
Rank 3: Container
Dec 9, 2023, 22:33
So that means if I need the function to start execution immediately I mark ASYNC in createExecutiom as false .. Is that accurate ?
punti_z
Rank 3: Container
Dec 9, 2023, 22:34
Ok and if an instance of that function is already running then ?
I receive multiple user sign ups and each triggers the same function that runs say for 5 secs. How would a call for immediate execution be handled
Drake
Dec 9, 2023, 22:38
Synchronous executions run concurrently
punti_z
Rank 3: Container
Dec 9, 2023, 22:39
Nice. Testing it right now. Will mark this as solved right after
punti_z
Rank 3: Container
Dec 11, 2023, 16:00
Turning it to false causes a lot of function failures. I'll mark it solved since at least I understand how its meant to function. Will open another thread if I need help.
punti_z
Rank 3: Container
Dec 11, 2023, 16:00
[CLOSED] Functions CreateExecution ASYNC flag does what exactly ?