Skip to content

Instantly share code, notes, and snippets.

@nz
Created February 29, 2012 17:38
Show Gist options
  • Save nz/1942822 to your computer and use it in GitHub Desktop.
Save nz/1942822 to your computer and use it in GitHub Desktop.
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