Replace loop by while

This commit is contained in:
Dzmitry Plashchynski
2015-03-05 14:14:35 +02:00
parent 750ecb98dd
commit 9ca68b305f
+1 -2
View File
@@ -64,8 +64,7 @@ module Crono
end end
def start_working_loop def start_working_loop
loop do while job = Crono.schedule.next do
job = Crono.schedule.next
sleep(job.next - Time.now) sleep(job.next - Time.now)
job.perform job.perform
end end