Created
February 29, 2012 17:38
-
-
Save nz/1942822 to your computer and use it in GitHub Desktop.
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
retry_count = 1 | |
begin | |
# any code that invokes an update to Solr | |
record.solr_index! | |
rescue RSolr::Error::Http | |
sleep 0.01 # wait 10ms | |
retry if (retry_count -= 1) >= 0 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment