Hello,
@alex.newpath is right. However I think that using this will not completely fix the issue, because if you get a burst of calls, all scenarios will pause and will (more or less) finish the sleep the same time…
Make doesn’t provide a way to configure the webhook queues. however, here are a few options you can consider:
1. Scheduling the called Webhook Scenario
Here, you can see that by default, the scenario executes immediately when a new message is received by the Webhook
If you schedule your scenario, the associated webhook will still receive the requests, but they will be picked regularly.
And with the Scenario setting “Max number of cycles”, you can define in some ways “how many messages” you grab once. If you set it to a maximum acceptable for Dall-E (ex: 6 or 7), you should be fine.
BUT, you have to be careful of 2 things:
-
A scheduled scenario consumes operations. If you set the scheduling to 1 min, it it consume at least one operation per minute; which can end-up using a lot per month (you can still fine tune scheduling to not do this the whole day for instance). I would suggest a longer time.
-
The queue of the webhook will fill with all the requests. It’s limited (based on your Make plan); so you have to be careful that, if you don’t consume enough messages vs what you get, you may have the Webhook queue full. It can be checked here
So, you may have to fine-tune the scheduling and the “Max number of cycles” value.
2. Set your scenario to run sequentially and not in parallel
This can be achieved here:
This option will make sure that your scenarios execute one after the other, and not in parallel.
The advantage is that, if you combine it with a Sleep module, as suggested by @alex.newpath, you are sure to never reach the limits of Dall-E.
BUT, you have to be careful, because if you get many requests, your Webhook queue could become full.
3. You use a Error Handler and use Sleep, Dall-E and Resume
For this, you let Dall-E fail from time to time, and when it happens, you try and replay after a sleep.
Here is an example
The second Dall-E is a clone of the first one, so that he does the exact same thing, and the resume picks the result so that next steps retrieve them as if the initial module didn’t fail.
It can limit errors, but you may want to filter the error handler so that it’s executed only when you have quota errors.
4. Use a Break error handler
Error handler allow to store the current bundle execution in a queue, so that it continues execution after a certain number of minutes
You first need to “Allow Storing of Incomplete executions”
Here, I configured it to try 3 times, and to wait 2 minutes between retries.
Here is what monitoring look like (when it fails)
When it fails, it goes to “Incomplete executions”. It will replay automatically after n minutes. If you have set “Automatically Complete Execution” to NO in the Break directive, you will have to resume execution manually.
It’s a lot of things, but I believe that at least one can be helpful
Benjamin