Async Functions

Hi Experts,

I have some peculiar behaviour with a function.

When it runs in SYNC mode it run perfectly. When in ASYNC nothing happens.

It used to run in ASYNC mode and then it just stopped working. No changes where made to the code.

The function is quite intensive, and could potentially release dozens of separate ASYNC functions as it works though a list . I am thinking maybe some of these are all jammed up, not sure.

Is there somewhere I can check where you can see ASYNC tasks either queued or failed?

Any feedback is welcome.

SB

I believe you should be able to see it in the system monitor.

You might want to look into what you are doing and see if any of them need to run synchronously,
or otherwise need to save some type of state somewhere before continuing and add that in.

One thing to consider is the architecture too. If you need a synchronous but long running operation, consider offloading the task from the client response. You could do this by creating a record in a table from the first async task from the client, then you could flag the record at the end of the async task which would kick off a separate synchronous processing of the record with a second server side function. This decouples the operation from the client while allowing your long workload to process synchronously and still giving the client the benefit of async operation.

3 Likes