From 70264b707ebf5cd81708af962821acc3b266fca5 Mon Sep 17 00:00:00 2001 From: Max Kadel Date: Wed, 27 Mar 2024 15:45:56 -0400 Subject: [PATCH] Add rake task for single dump for benchmarking Co-authored-by: Alicia Cozine Co-authored-by: Bess Sadler Co-authored-by: Carolyn Cole Co-authored-by: Robert-Anthony Lee-Faison --- lib/tasks/orangeindex.rake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/tasks/orangeindex.rake b/lib/tasks/orangeindex.rake index 98b8cb9c..3f5e0183 100644 --- a/lib/tasks/orangeindex.rake +++ b/lib/tasks/orangeindex.rake @@ -108,6 +108,15 @@ namespace :liberate do IndexManager.for(solr_url).index_remaining! end + desc "Index single incremental dump" + task index_single_dump: :environment do + solr_url = ENV['SOLR_URL'] || default_solr_url + next_dump = Dump.find(1177) + next_dump.dump_files.each do |dump_file| + Alma::Indexer::DumpFileIndexer.new(dump_file, solr_url:).index! + end + end + desc "Index a single MARC XML file against SET_URL" task index_file: :environment do solr_url = ENV['SET_URL'] || default_solr_url