From d18aa96dde2d797df7477695a7a636bfc02b1967 Mon Sep 17 00:00:00 2001 From: carolyncole <1599081+carolyncole@users.noreply.github.com> Date: Wed, 3 Apr 2024 15:49:15 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Alicia Cozine Co-authored-by: Max Kadel Co-authored-by: Robert-Anthony Lee-Faison Co-authored-by: Kat King --- lib/tasks/orangeindex.rake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/tasks/orangeindex.rake b/lib/tasks/orangeindex.rake index 3f5e0183..7ecda1a3 100644 --- a/lib/tasks/orangeindex.rake +++ b/lib/tasks/orangeindex.rake @@ -108,10 +108,12 @@ namespace :liberate do IndexManager.for(solr_url).index_remaining! end - desc "Index single incremental dump" + desc "Index single incremental dump uses ENV['DUMP_ID'] (default 1177)" task index_single_dump: :environment do - solr_url = ENV['SOLR_URL'] || default_solr_url - next_dump = Dump.find(1177) + solr_url = ENV['SOLR_URL'] || "http://lib-solr8d-staging.princeton.edu:8983/solr/catalog-performance" + dump_id_str = ENV['DUMP_ID'] || '1177' + dump_id = dump_id_str.to_i + next_dump = Dump.find(dump_id) next_dump.dump_files.each do |dump_file| Alma::Indexer::DumpFileIndexer.new(dump_file, solr_url:).index! end