I have a ruby on rails application with a lot of sidekiq workers. Some of workers can work for a while (at least few minutes).
How can I block some record for changes from another places (ie controllers), to avoid data conflict when I save this record in the worker?
You need to lock the model:
You can read more about it here.