From c7d178d04f324c010de1552083a954bb4b02217d Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Thu, 5 Feb 2009 14:50:06 -0600 Subject: 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 --- lib/puppet/agent.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib') 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" -- cgit