summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-02-05 14:50:06 -0600
committerLuke Kanies <luke@madstop.com>2009-02-06 18:08:43 -0600
commitc7d178d04f324c010de1552083a954bb4b02217d (patch)
treec52cd50e351f8f8239666510609242401a560248 /lib
parentc0fcb2137e66af8ba60a959faa221034c6832b69 (diff)
downloadpuppet-c7d178d04f324c010de1552083a954bb4b02217d.tar.gz
puppet-c7d178d04f324c010de1552083a954bb4b02217d.tar.xz
puppet-c7d178d04f324c010de1552083a954bb4b02217d.zip
The Agent now uses its lockfile to determine running state
This makes it so we can easily create and use lots of agent instances, rather than having a single global instance with shared state. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/agent.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/puppet/agent.rb b/lib/puppet/agent.rb
index e7d40f68c..438b668a6 100644
--- a/lib/puppet/agent.rb
+++ b/lib/puppet/agent.rb
@@ -37,7 +37,7 @@ class Puppet::Agent
# Perform a run with our client.
def run
- if client
+ if running?
Puppet.notice "Run of %s already in progress; skipping" % client_class
return
end
@@ -56,11 +56,6 @@ class Puppet::Agent
end
end
- # If the client instance is set, we're mid-run.
- def running?
- ! client.nil?
- end
-
def stop
if self.stopping?
Puppet.notice "Already in shutdown"