Watch keynotes and sessions from, our virtual developer conference.

Multiple stitch functions in a chain

I have a mongoDB instance which has a set of data uploaded every 24 hours. There is then a set of aggregation pipelines which need to run to clean and prepare the data. The restrictions of stitch have meant I need to split the pipeline into a number of functions each of which will complete in under 90 seconds. Now I’m at the stage where I need to run these 5 scripts one after the other. Triggering them from database updates is one option but I don’t want script 2 firing before script 1 has completed.

Question: Is there a good way to fire multiple functions in order , one at a time? The entire set of scripts takes 7 minutes to run.

Hi Neil –

Currently, I would recommend running the functions one after another via Triggers with some sort of state stored on the document itself (such as a field storing the last run time/stage). We have an item tracking longer runtime on and if you have another suggestion on how we could better support this case you can add it there.


1 Like