My users periodically queue up a large batch of things to process that need to call apis and whatnot and can take a bit of time to complete. That said they can run in parallel.
We call them Posts
I’m wondering if the right way to make the list run is to, for every Post we create we schedule an API Workflow to run on it, and then ‘forget about it’.
Could this put undue load on the system (race condition) if a bunch of those api workflows are scheduled to run at the same time? It could literally be hundreds or thousands of them.
I’ve gotten in trouble a few times in the past by scheduling too many API Workflows at the same time.
I’ve not yet put this in practice, but I’ve been toying with an idea for a queue.
anytime a user performs an action that would trigger the API Workflow, create a queueThing instead. (aka save all the info into a new object without calling all the workflows you have in mind)
create a recursive workflow that takes those queueThings and, 1 by 1, goes through the whole workflow that you have in mind.
somehow trigger that recursive workflow anytime there are items in the queue.