alphagov/whitehall — pull request #1235 by JordanHatch (2014-01-28 14:45:58+00:00)
Title: Register a detailed guide with Panopticon on publish

This pull request changes how detailed guides are registered with Panopticon.

Currently, there's a Rake task which indexes all published guides at once. This adds a service listener which will register detailed guides with Panopticon whenever they are published or force published.

The actual request to Panopticon takes place in a Sidekiq worker, which accepts a single parameter from the message queue of the ID of the edition to be published.

I've also refactored the `panopticon:register_guidance` Rake task to use the newly-created `RegisterableEdition` class so that we don't duplicate the code for building an artefact.