Replace loop by while

This commit is contained in:
Dzmitry Plashchynski
2015-03-05 14:14:35 +02:00
parent 750ecb98dd
commit 9ca68b305f

View File

@@ -64,8 +64,7 @@ module Crono
end
def start_working_loop
loop do
job = Crono.schedule.next
while job = Crono.schedule.next do
sleep(job.next - Time.now)
job.perform
end