Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions node-util/conf/watchman/plugins.d/frontend_plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,6 @@ def apply(iteration)
FileUtils.rm_r(gear_dir)
end

# Cleanup the empty conf gear directories. For e.g. directories for scalable
# application's db gears.
Dir.glob(PathUtils.join(conf_dir, '*')).each do |entry|
next unless File.directory?(entry)
next unless Dir["#{entry}/*"].empty?

# Verify name is of the form we expect for these directories i.e. gearuuid_domain_gearuuid
dir_name = File.basename(entry)
next if /(.*)_(.*)_(.*)/ !~ dir_name
dir_name_parts = dir_name.split('_')
next if dir_name_parts[0] != dir_name_parts[2]

FileUtils.rm_r(entry)
@logger.info %Q(watchman frontend plugin cleaned up #{entry})
end

if reload_needed
::OpenShift::Runtime::Frontend::Http::Plugins::reload_httpd
end
Expand Down