mperham/sidekiq — pull request #380 by adammeghji (2012-08-30 16:01:05+00:00)
Title: Fixed issue with pagination and scheduled jobs in web UI

I've fixed an issue with pagination and scheduled jobs in the web UI. Since schedules are stored as ZSETs, and are fetched :with_scores => true, the resulting items are in the form [item.0, score.0, item.1, score.1, etc..].

The GET '/scheduled' Web UI action assumes @scheduled is a hash keyed off the item's score, but it's actually an array of item + score data interleaved. This breaks the web UI, since web/views/scheduled.slim requires @schedules to be items only.

My change results in paginated items as {:score.0 => item.0, :score.1 => item.1, etc..}. This fixes the scheduled tab on the Web UI. AFAIK this is good to go with no side effects.