Replies: 1 comment
-
You could try overriding the https://github.com/laravel-workflow/laravel-workflow/blob/master/src/Workflow.php#L77 If you replace Let me know if that doesn't work. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is similar to Laravel's WithoutOverlapping feature.
In my app I have workflows that are triggered by webhooks, sometimes I get a lot of webhooks for the same record all at once (up to 5-10 webhooks within a second).
If the webhook spawns multiple workflows that all run at the same time it ends up causing conflicts and sometimes I lose data. I do want all of the workflows to run, but I want them to run one at a time (ideally in the order they were created, but this isn't essential).
At the moment I achieve this using atomic locks
Is it possible to prevent workflows from overlapping (based on a parameter passed in) or can I use atomic locks inside an Activity to achieve a similar outcome?
Beta Was this translation helpful? Give feedback.
All reactions