Promise in Codeless

Hello! I continue to study Codeless. I am doing a little optimization. I need to get all the objects from the table, replace some of their data and save it back.

I’m trying to do the following. I in a cycle get out 100 objects each, make updates and try to save, but I get a timeout error.I read about the Promise, but I can’t figure out how to implement it in Codeless. Please help me) Thanks in advance.

Hello,

By default Backendless will wait for 5 seconds for your business logic (API service, event handler or timer) to complete its execution. When you implement with Codeless, all the handling of Promises is taken care of. If you get a timeout, it means the code doesn’t complete in allowed 5 seconds. That limit can be increased to 20 seconds. To do that, your app should be on a paid plan and you need to purchase the Enhanced code execution time function pack from the Marketplace:

Hope this helps.

Regards,
Mark

1 Like

Good. I understood. Thank Mark!