Dispatch queue jobs inside a transaction. #5077
joetifa2003
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dispatching a queue job inside lucide transaction when using sql adapter can be really useful.
For example in user create controller, I can insert the user and enqueue the onboarding job in the same transaction, that way all happens or nothing, leaving no room for a user getting created without being onboarded.
Of course you can have a cron which deals with this kind of situation, but it can be a big advantage for the sql driver to do that in a transaction.
Beta Was this translation helpful? Give feedback.
All reactions