Skip to content

Commit

Permalink
Merge pull request #391 from NYULibraries/solr_wrapper-bug-69
Browse files Browse the repository at this point in the history
workaround for core exists error
  • Loading branch information
mnyrop authored Nov 1, 2024
2 parents f52041e + 8e8bf34 commit 70c2228
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/tasks/sdr.rake
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'fileutils'

desc 'Run test suite'
task ci: :environment do
shared_solr_opts = { managed: true, verbose: true, persist: false, download_dir: 'tmp' }
Expand All @@ -17,11 +19,11 @@ end
namespace :sdr do
desc 'Run Solr and GeoBlacklight for interactive development'
task server: %i[environment] do |_t, _args|
require 'solr_wrapper'

shared_solr_opts = { managed: true, verbose: true, persist: false, download_dir: 'tmp' }
shared_solr_opts[:version] = Settings.SOLR_VERSION if Settings.SOLR_VERSION

FileUtils.rm_rf Settings.SOLR_INSTANCE_DIR

SolrWrapper.wrap(shared_solr_opts.merge(port: Settings.SOLR_PORT, instance_dir: Settings.SOLR_INSTANCE_DIR)) do |solr|
solr.with_collection(name: Settings.SOLR_INSTANCE_NAME, dir: Rails.root.join('solr/conf').to_s) do
puts "Solr running at #{Settings.SOLR_URL}, ^C to exit"
Expand Down

0 comments on commit 70c2228

Please sign in to comment.