Class: Puppet::Scheduler::Scheduler Private

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/scheduler/scheduler.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(timer = Puppet::Scheduler::Timer.new) ⇒ Scheduler

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Scheduler.



4
5
6
# File 'lib/puppet/scheduler/scheduler.rb', line 4

def initialize(timer=Puppet::Scheduler::Timer.new)
  @timer = timer
end

Instance Method Details

#run_loop(jobs) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
11
12
13
14
# File 'lib/puppet/scheduler/scheduler.rb', line 8

def run_loop(jobs)
  mark_start_times(jobs, @timer.now)
  while not enabled(jobs).empty?
    @timer.wait_for(min_interval_to_next_run_from(jobs, @timer.now))
    run_ready(jobs, @timer.now)
  end
end