Skip to content

Commit

Permalink
Merge pull request marklogic-community#350 from grtjn/323-clean-fores…
Browse files Browse the repository at this point in the history
…t-breaks

Fixed marklogic-community#323: clean of read-only forests breaks
  • Loading branch information
paxtonhare committed Jan 20, 2015
2 parents 1993231 + 70ce563 commit f0e879b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions deploy/lib/server_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1378,11 +1378,13 @@ def deploy_content

def clean_content
logger.info "Cleaning #{@properties['ml.content-db']} on #{@hostname}"
execute_query %Q{
r = execute_query %Q{
for $id in xdmp:database-forests(xdmp:database("#{@properties['ml.content-db']}"))
return
xdmp:forest-clear($id)
try { xdmp:forest-clear($id) } catch ($ignore) { fn:concat("Skipped forest ", xdmp:forest-name($id), "..") }
}
r.body = parse_json(r.body)
logger.info r.body
end

def deploy_cpf
Expand Down

0 comments on commit f0e879b

Please sign in to comment.