Does it need to happen synchronously,
Does it need to happen synchronously, before the HTTP response ends? If not, you could use Workflows and do batches of 100 and then a sleep. Alternatively, you could use Queues and publish a message per item and have some rate limiting, but Workflows will be better imo. Only drawback will be you’d need to create sub Workflows at a certain point with the current step limit (e.g. you’d have an effective cap of 51,200 inserts per Workflow)
2 Replies
I only have 300 items so I don't think I will ever reach 51,200
But yes it's like
I hit a call get instead 300 record from one database
then other database where I have to put it
it has limit of 100
so we have to first get those 100 ,100,100
and then update them,create them, delete them
Depending upon the requirement
do you think workflow is better approach?
@Ashley for this one?
Do you need to handle it as part of the HTTP request, or can you return a response and handle the database updates asynchronously? If you can handle async, Workflows will work nicely I think. You could also use Queues but I think you then have to have something to handle rate limiting vs Workflows it will be simpler to just “wait” for 1 min between batches I suspect