jmettraux/rufus-scheduler — pull request #129 by ecin (2014-08-14 19:00:14+00:00)
Title: Lock Improvements

This code goes along with #128

It refactors how `Rufus::Scheduler` handles locks (no more need for subclasses!), but more importantly it allows multiple schedulers to run concurrently, with only one of them running jobs at any given time.

Additionally, this fixes a seeming bug with `JobArray#delete_unscheduled`. A job's `@next_time` value can be `nil` or `false` if it never intends to run again, but we only checked for a `nil` value. With the fix, jobs that are scheduled using `scheduled_in`, for example, will get pruned.