mirror of
https://github.com/plashchynski/crono.git
synced 2026-03-20 16:44:18 +01:00
Replace loop by while
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user