Hey,

Using refresh_from_update immediately before updating the object will not solve the problem (and will only add an additional useless query). It will minimize the risk of working on a stale copy of the data but it wont prevent it.

When talking about a resource that is being updated extensivly (think about a concert ticket sells counter seconds after the opening) you dont want to rely on chance.

Written by

Full Stack Developer, Team Leader, Independent. More from me at https://hakibenita.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store