mirror of
https://github.com/plashchynski/crono.git
synced 2026-11-17 06:01:05 +01:00
Replace loop by while
This commit is contained in:
1 parent
750ecb98dd
commit
9ca68b305f
1 file changed
+1
-2
+1
-2
@@ -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