Added ability to delete elasticsearch processors first (for cleanup).
This commit is contained in:
parent
68b85efc24
commit
f3cbe7f10e
1 changed files with 14 additions and 15 deletions
|
@ -60,21 +60,20 @@ update processors
|
||||||
|
|
||||||
items.each do |item|
|
items.each do |item|
|
||||||
if item[:action] == 'delete'
|
if item[:action] == 'delete'
|
||||||
#Rails.logger.info "# curl -X DELETE \"#{url}\""
|
Rails.logger.info "# curl -X DELETE \"#{url}\""
|
||||||
#response = UserAgent.delete(
|
response = UserAgent.delete(
|
||||||
# url,
|
url,
|
||||||
# {
|
{
|
||||||
# json: true,
|
json: true,
|
||||||
# open_timeout: 8,
|
open_timeout: 8,
|
||||||
# read_timeout: 12,
|
read_timeout: 12,
|
||||||
# user: Setting.get('es_user'),
|
user: Setting.get('es_user'),
|
||||||
# password: Setting.get('es_password'),
|
password: Setting.get('es_password'),
|
||||||
# }
|
}
|
||||||
#)
|
)
|
||||||
#Rails.logger.info "# #{response.code}"
|
Rails.logger.info "# #{response.code}"
|
||||||
#next if response.success?
|
next if response.success?
|
||||||
#raise "Unable to process DELETE at #{url}\n#{response.inspect}"
|
raise "Unable to process DELETE at #{url}\n#{response.inspect}"
|
||||||
next
|
|
||||||
end
|
end
|
||||||
Rails.logger.info "# curl -X PUT \"#{url}\" \\"
|
Rails.logger.info "# curl -X PUT \"#{url}\" \\"
|
||||||
Rails.logger.debug "-d '#{data.to_json}'"
|
Rails.logger.debug "-d '#{data.to_json}'"
|
||||||
|
|
Loading…
Reference in a new issue