summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-05-17 23:16:22 -0500
committerJames Turnbull <james@lovedthanlost.net>2009-05-18 17:07:17 +1000
commit2771918b9eef9ed26e59688c17c64e86de1b9983 (patch)
tree1b973d714e42fe41e5b20e942c1c3848886c826e /lib
parent07ff4be92a1d46fe0f6ec3de3c33b5a3b99be755 (diff)
downloadpuppet-2771918b9eef9ed26e59688c17c64e86de1b9983.tar.gz
puppet-2771918b9eef9ed26e59688c17c64e86de1b9983.tar.xz
puppet-2771918b9eef9ed26e59688c17c64e86de1b9983.zip
Relying on threads rather than sleeping for puppetqd
We previously manually slept, but this uses the queue client to handle keeping the process running, by just joining all running threads. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/application/puppetqd.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/puppet/application/puppetqd.rb b/lib/puppet/application/puppetqd.rb
index 05bb21fe9..a3a302e17 100644
--- a/lib/puppet/application/puppetqd.rb
+++ b/lib/puppet/application/puppetqd.rb
@@ -39,7 +39,7 @@ Puppet::Application.new(:puppetqd) do
catalog.save
end
- sleep_forever()
+ Thread.list.each { |thread| thread.join }
end
# Handle the logging settings.
@@ -69,8 +69,4 @@ Puppet::Application.new(:puppetqd) do
daemon.daemonize if Puppet[:daemonize]
end
-
- def sleep_forever
- while true do sleep 1000 end
- end
end