Is it possible for a CC task to execute in the background after it has been triggered from in the app? Currently the app goes into a loading state and the user cannot do anything until the CC task is done. Should I rather use a webhook if I don’t want the app to go into that loading state?
For TypeScript apps: you can simply omit the leading
await and your task will be triggered in the background.
- Using webhooks is currently the best way to enqueue a CloudCode without blocking the UI
- Another option is to have chained CC tasks, where your first task simply enqueues the longer running task and returns to the app quickly. While not fully async, this can greatly reduce the waiting time.