-
Notifications
You must be signed in to change notification settings - Fork 521
Open
Description
Is there any way to make the method defined by after_transition/do fire after the SQL commit has taken place?
I'm seeing race condition between state machine and resque. That is, if I drop an event in an after_transition, resque will pick up the job, and load the object before the initial transaction has been committed to the database - thus getting stale data.
If I dropped the event after the COMMIT has taken place, this would be a non-issue. Fixing this 'bug' on the resque side is hacky at best. I could lock, sleep, loop/repeat, meh, none of it looks good.
Thanks
IanVaughan, grzesiek, AlexanderUlitin, dpisarewski, duffuniverse and 1 more
Metadata
Metadata
Assignees
Labels
No labels