mirror of
https://github.com/plashchynski/crono.git
synced 2026-07-08 13:55:08 +02:00
Replace loop by while
This commit is contained in:
+1
-2
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user