Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



Ah, 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: