A better way to check on status other than than Sleep Tool

My application takes too long to run to be really desirable due to a module step where it sleeps for around two minutes, just to be sure that the previous parsing job has finished successfully.

In the scenario, a PDF is uploaded to Llama Parse to be parsed, then the JSON Result is taken to an OpenAI Assistant. The Get JSON Results fails, if the Get Job ID is still pending. So the sleep step is set to two minutes, because sometimes it takes 10 seconds, sometimes almost the two minutes to parse.

How can I set this up to be faster? It probably needs to be somethings that checks wheter the outptut of the Get JSON ID step is on status “pending” or on status “success”.

Any idea how you would solve this?

Welcome to the Make community!

There are two methods if you want to do a polling wait in the same/single scenario.

Method 1 — difficulty level: Easy

The simplest solution would be to use a Sleep module to wait out 5 minutes (or the longest period that the external service takes).

You could even use more than one, if you have a Make subscription (free tier max 5 minutes per scenario run).

Method 2 — difficulty level: ???

This other method allows you to check multiple times at shorter intervals, because you “throw” an error to break from the repeater and end the scenario when successful/completed.

The secret is in the success check filter, the error handler, and the commit directive.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.