Why are these throttled messages executing while earlier message has failed #1256
-
I have this set of coordinated Inngest functions: Their purpose is to push mutation events into airtable. You will notice that I try to limit any messages for a tenant and environment pair to 1, attempting to ensure the correct application order of the events (see https://github.com/cozemble/breezbook/blob/8949f2d5c2819b0597c6c54d9ff1cf3b451543b4/backend/airtable/src/inngest/announceChangesToAirtable.ts#L107) What I see when I run this locally, is that later events seem to get processed when an earlier event has failed. What do I have to do to ensure that later events wait if an earlier event has failed? Thx! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Could you clarify on what you mean by this? If so, what is the criteria for re-enabling the processing? |
Beta Was this translation helpful? Give feedback.
-
This helped a lot Darwin, thanks. It finally sank in this morning, as noted here - https://github.com/cozemble/breezbook/blob/235adf85484711e2be1229d07973edbe7f20bda2/dev-diaries/mikehogan-dev-diary.md?plain=1#L37 |
Beta Was this translation helpful? Give feedback.
Thanks for the table, that makes things a lot more clear now.
Answering your question, yes it can.
It seems you're splitting the job into multiple functions, so what I'd recommend would be either put all the steps within a function or to have a function trigger another when it's done with it's job, and not send out the events all at once.
Basically, when you read the code, it should be traceable in order by the eye, just like how you'd expect it to run sequentially.
There are 3 ways to do it with …