This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Eric Meyer's Reset Reloaded – SASS version | |
| http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ | |
| html, body, div, span, applet, object, iframe, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
| a, abbr, acronym, address, big, cite, code, | |
| del, dfn, em, font, img, ins, kbd, q, s, samp, | |
| small, strike, strong, sub, sup, tt, var, | |
| dl, dt, dd, ol, ul, li, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/b29b9ac9b43a5281 | |
| seconds_to_wait_for_lock = 5 | |
| begin | |
| raise "Timed out while trying to acquire lock" unless connection.select_value("SELECT GET_LOCK('order_lock_for_product_#{@product.id}', #{seconds_to_wait_for_lock})") == "1" | |
| # ... validate order availability ... | |
| # ... create orders ... | |
| rescue | |
| # ... oh oh ... | |
| # ... a stuck lock? ... |
NewerOlder