I have a process for updating info in my database from an API call. The API call usually happens from a page for the user one at a time. Now I built a snippet that pulls the list (100 or so) db entries that need updating and I loop through calling my REST api and then updating the DB with the results. But, it gets a 504 Gateway error after 10 or so calls (not to mention locks my site for user traffic). I’m on MODX Cloud.
What’s a better way to do this kind of task?