Adding some limits and monitoring with iNotify
This commit is contained in:
@@ -37,15 +37,16 @@ module Pipeline::Util
|
|||||||
def run_analyzer
|
def run_analyzer
|
||||||
notifier = INotify::Notifier.new
|
notifier = INotify::Notifier.new
|
||||||
notifier.watch("#{workdir}/iteration", :moved_to, :create) do |event|
|
notifier.watch("#{workdir}/iteration", :moved_to, :create) do |event|
|
||||||
puts "#{event.name} is now in iteration!"
|
puts "!!!!!!!!!!! #{event.name} is now in iteration!"
|
||||||
end
|
end
|
||||||
notifier.watch("#{workdir}/tmp", :moved_to, :create) do |event|
|
notifier.watch("#{workdir}/tmp", :moved_to, :create) do |event|
|
||||||
puts "#{event.name} is now in tmp!"
|
puts "!!!!!!!!!!! #{event.name} is now in tmp!"
|
||||||
end
|
end
|
||||||
Thread.new do
|
Thread.new do
|
||||||
notifier.run
|
notifier.run
|
||||||
end
|
end
|
||||||
runc.run(workdir)
|
runc.run(workdir)
|
||||||
|
ensure
|
||||||
puts "ALL DONE"
|
puts "ALL DONE"
|
||||||
notifier.stop
|
notifier.stop
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user