active_presenter
active_presenter copied to clipboard
Callback transaction race conditions
It seems that save methods call _run_save_callbacks within the transaction, and the data may not have been written to the database by the time that a job is spawned and ran within another instance (such as resque).
You would expect that after_save callbacks would be fired after the the transaction has been completed.
Hi Josh,
I haven't used this project in ages so don't really have much motivation to fix things. Have you been able to test and fix in a branch, or found someone that did? Happy to pull if that's the case.
Cheers,
d.
On Tue, Nov 8, 2011 at 6:54 PM, Josh Martin < [email protected]>wrote:
It seems that save methods call _run_save_callbacks within the transaction, and the data may not have been written to the database by the time that a job is spawned and ran within another instance (such as resque).
You would expect that after_save callbacks would be fired after the the transaction has been completed.
Reply to this email directly or view it on GitHub: https://github.com/jamesgolick/active_presenter/issues/4
I'm looking in to the issue as it is introducing race conditions in a production environment. I should have a fix for it sometime this week.