alphagov/whitehall — pull request #1747 by alext (2014-10-01 16:40:55+00:00)
Title: Rake task to requeue all scheduled publishing jobs.

At the moment, after a database restore (ie after a data sync to staging or preview), the list of scheduled editions does not match the list of sidekiq jobs in redis. There is an existing task to add jobs for any editions that have mising jobs. This works for some cases, however it fails to account for editions that are no longer
scheduled (orphaned sidekiq jobs), or editions that have have their scheduled time changed.

To address this, we therefore delete all sidekiq jobs for the `ScheduledPublishingWorker` and then re-queue all editions that are scheduled for publication.

https://www.pivotaltracker.com/story/show/79398610