Class: Chef::Application::Solo
Instance Method Summary
collapse
#configure_chef, #configure_logging, debug_stacktrace, exit!, fatal!, #run
Constructor Details
#initialize ⇒ Solo
Returns a new instance of Solo.
94
95
96
97
|
# File 'lib/chef/application/solo.rb', line 94
def initialize
super
@chef_solo = nil
end
|
Instance Method Details
99
100
101
|
# File 'lib/chef/application/solo.rb', line 99
def reconfigure
super
end
|
#run_application ⇒ Object
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
# File 'lib/chef/application/solo.rb', line 106
def run_application
loop do
begin
if Chef::Config[:splay]
splay = rand Chef::Config[:splay]
Chef::Log.debug("Splay sleep #{splay} seconds")
sleep splay
end
@chef_solo = Chef::Client.new
@chef_solo.run
@chef_solo = nil
Chef::Application.exit! "Exiting", 0
rescue SystemExit => e
raise
rescue Exception => e
Chef::Application.debug_stacktrace(e)
Chef::Application.fatal!("#{e.class}: #{e.message}", 1)
ensure
GC.start
end
end
end
|
#setup_application ⇒ Object
103
104
|
# File 'lib/chef/application/solo.rb', line 103
def setup_application
end
|