codeforamerica/golden-ticket — pull request #58 by plusjeff (2014-12-01 19:16:13+00:00)
Title: Lottery run functionality added

After the close date has been passed, the lottery run functionality is enabled on the `/Admin/ViewApplicants` page via a notice area. This allows the lottery to be run for all schools with the click of a button.

Additionally, after the lottery is run, selected students can be removed from a school and the lottery algorithm is used to pick the next applicable candidate from the school's waitlist.

The lottery algorithm was adapted from the golden-ticket-console command line app used earlier in the year. The performance of the lottery itself is fairly performant, but the cross school reconcilation runs a little slow and could be optimized in the future. Despite this, it's still under a minute to run it (locally on my machine...server may be quicker or slower depending on load/specs).