im creating a many sending request on an api since it cant do send request many at one time im doing the only way is to loop but to avoid doing too many request api error im doing sending only 10 rquest and do sleep then send another 10 is there a way on how to properly do it? thanks!
Hello.
That strategy was recommended a few years ago.
https://www.outsystems.com/forums/discussion/68656/create-a-timed-action-to-get-api-rest-data/#
If you are doing with a timer, assuming you have some attribute to mark the ones already send and don't repeat work, you can end the timer and wake it again, it will give a few seconds to rest.
If you are doing from the client side, I would use JavaScript's SetInterval to update status of previous call before calling again. This way user is always informed of status (instead of just waiting) and calls are spaced a few seconds.
this deosnt resolve on my part
I gave 3 possible solutions. None of those work? Why? What is your particular scenario?
the 2nd one you gave is too general, but thanks!
Because there are several resources on that:
Both official courses:
https://learn.outsystems.com/training/journeys/async-processing-timers-586
And community events:
https://usergroups.outsystems.com/events/details/outsystems-inc-chennai-presents-masterclass-11-batch-processing-using-timers
I could try to explain how to set it up in a post, but it takes an hour to do it properly.
Your timer will be like this.
You search for the records not sent. Send them. Save each into database. Mark the timer to wake up and end it.
A few seconds later, the timer will restart and do it again until there is no more data.