Rank 2: Process
I'm having trouble understanding how to use the async: true flag in the createExecution function. Do I need to create some sort of queue system? I can't find any examples of how to do this for Cloud + Web (Node.js)
When I try to run the following function multiple times without async: true It's only running the first one. If I add async: true I get a server error: Error: Function execution failed with status 0:
try { const execution = await functions.createExecution( "6667045d000c65a2ddcb", id, true )
if ( execution.responseStatusCode >= 200 && execution.responseStatusCode < 300 ) { return JSON.parse(execution.responseBody) } else { throw new Error( `Function execution failed with status ${execution.responseStatusCode}: ${execution.responseBody}` ) } } catch (error) { console.error("Error fetching payment from server: ", error) throw error }}