API Rate Limit

Hello,

I am using an API with a rate limit, so I need to wait a specific amount of time before executing the call again.

image

How can I achieve that?

Thank you.

You can use WAIT step.
Have used it before for similar rate-limiting API setup in Wappler.

Hello sid,

There is not any “Wait” component as you can see below.

I think Wait is only available for NodeJS - are you on PHP?

Yes, I am on PHP.

How long do you need to wait for between calls?

30 seconds or so.

Thank you, but I do not want to use custom stuff to avoid possible issues with Wappler.

I would set up a separate queue table in the DB that your CSV import inserts the lines to. You could then use a chronjob to process the earliest unprocessed item from that queue every 30 seconds or so marking the one it has processed as complete once the API has run.

What do you mean with possible issues with Wappler?

That GitHub Project says: “Project updated to Wappler 3.9.5”.

Now we have 5.4.2.

Clearly, the Project is not current and may cause issues with the latest version of Wappler.

I am guessing that as it’s the developer of said extension and it’s one of the most active users in the community I would assume it works perfectly fine with the latest version.

Also, not much has changed for Server Connect extensibility since version 3.

I would say it’s safe for you to use the extension.

To add to what Jonas has explained, this particular extension does not do much actually. So you can safely use it on v5.
And in case you encounter such older extensions from me or others, you can just post the problem.

Of course you can safely use the extension, especially when you need this functionality.

1 Like

What do I need to copy precisely?

I do not want to ruin my current Wappler Project by replacing my files with those…

You need to copy just the extensions folder in your project root folder.

1 Like

It works! Thank you!

Where do I need to add the component in my tree?

Before the “API Action” or after the “Database Insert”, inside or outside the “EXEC”?

I would do it after the insert step, inside the exec.

So first time API would get called immediately. But after that, it will wait for given time to run the next iteration of repeat, and call API…