diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-18 20:41:54 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-18 20:41:54 +0000 |
| commit | b3ea53cd99df84a93fe2f093d2224e711f49e5dd (patch) | |
| tree | 848e3b2bc03865709e4b6e38f1536ebec99ba8b0 /lib/puppet/client.rb | |
| parent | 93771b7935e544630c3416fda928a3820c615df2 (diff) | |
| download | puppet-b3ea53cd99df84a93fe2f093d2224e711f49e5dd.tar.gz puppet-b3ea53cd99df84a93fe2f093d2224e711f49e5dd.tar.xz puppet-b3ea53cd99df84a93fe2f093d2224e711f49e5dd.zip | |
Adding a lot of structure to puppet.rb to make it easier to manage multiple objects in a single process, including making it easy to add threads. Added some testing for all of that.
Also added a "runner" server, meant to be started within puppetd, so that clients can have runs triggered from a central host
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1212 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/client.rb')
| -rw-r--r-- | lib/puppet/client.rb | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/puppet/client.rb b/lib/puppet/client.rb index 7f6ed2592..f1884ac85 100644 --- a/lib/puppet/client.rb +++ b/lib/puppet/client.rb @@ -145,25 +145,19 @@ module Puppet # Start listening for events. We're pretty much just listening for # timer events here. def start - # Create our timer - timer = EventLoop::Timer.new( + # Create our timer. Puppet will handle observing it and such. + timer = Puppet.newtimer( :interval => Puppet[:runinterval], :tolerance => 1, :start? => true - ) - - # Stick it in the loop - EventLoop.current.monitor_timer timer - - # Run once before we start following the timer - self.runnow - - # And run indefinitely - observe_signal timer, :alarm do + ) do if self.scheduled? self.runnow end end + + # Run once before we start following the timer + self.runnow end require 'puppet/client/proxy' |
