Fixed compatiblity with Mongoid 4.x and DelayedJob 4.x.