3 ms·
As I understand it, the concurrency-safe lock is built into Rails for a while. Step 3 shouldn’t be necessary. https://github.com/rails/rails/pull/22122 https:/
by nthj 6y ago
As I understand it, the concurrency-safe lock is built into Rails for a while. Step 3 shouldn’t be necessary.
https://github.com/rails/rails/pull/22122 https://github.com/rails/rails/pull/22122
- jpp 6y agoAh, very nice! Our setup is on python, and because of some other dev tooling we have, it’s very easy for us to have a simple decorator function that grabs the advisory lock. We can apply that decorator to any python function, including the one that triggers our migrations. If on rails, seems like using the above link would be better.