I have a Rails object with after_update callback that sends a record to a queue. And the problem is that I noticed sometimes the queue is being processed faster
after_update
after_save, after_create, after_update are called within the transaction block, so they will be executed before executing the SQL statement.
after_save
after_create
If you want to do something when the statement execution is completed, you should use after_commit callback.