diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-04 06:44:01 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-01-04 06:44:01 +0000 |
| commit | f4b2e13dfbfa00c40400d979275b6b98bff05f4f (patch) | |
| tree | cc408a1ce448d65b492d3902988b2f3349b606c5 /lib/puppet/server | |
| parent | 098081d88fe17b221bad00c17ccff42324823a7a (diff) | |
| download | puppet-f4b2e13dfbfa00c40400d979275b6b98bff05f4f.tar.gz puppet-f4b2e13dfbfa00c40400d979275b6b98bff05f4f.tar.xz puppet-f4b2e13dfbfa00c40400d979275b6b98bff05f4f.zip | |
Fixing #391. Keeping track of times of compile and freshness checks.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2034 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/server')
| -rw-r--r-- | lib/puppet/server/master.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/puppet/server/master.rb b/lib/puppet/server/master.rb index 79fe53da0..cda6027d0 100644 --- a/lib/puppet/server/master.rb +++ b/lib/puppet/server/master.rb @@ -55,6 +55,14 @@ class Server # Tell a client whether there's a fresh config for it def freshness(client = nil, clientip = nil) + if Puppet.features.rails? and Puppet[:storeconfigs] + host = Puppet::Rails::Host.find_or_create_by_name(client) + host.last_freshcheck = Time.now + if clientip and (! host.ip or host.ip == "") + host.ip = clientip + end + host.save + end if defined? @interpreter return @interpreter.parsedate else |
