alphagov/publisher — pull request #68 by jamiecobbett (2013-01-09 14:24:28+00:00)
Title: Make single registration more robust

This task iterates through each published edition (currently there are almost 3000) and "registers" it with panopticon - which in turn pushes data to the search index.

If any single registration times out, the process doesn't retry or continue, and can't be resumed (though it can be restarted).

This task is used to rebuild search data nightly on staging and preview, and has failed at least once: http://deploy.production.alphagov.co.uk/job/Copy%20Data%20to%20Staging/82/console (see the stack trace near the end).

A note on ``retry``:
"If retry appears in rescue clause of begin expression, restart from the beginning of the begin body." http://www.tutorialspoint.com/ruby/ruby_loops.htm

I've tested my changes and they appear to work.