Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #530 from sul-dlss/deprecate-reindex_pid_list
Browse files Browse the repository at this point in the history
Deprecate reindex_pid_list
  • Loading branch information
jcoyne committed Apr 9, 2019
2 parents 4a4b00b + 6e7b0d1 commit 8df263d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/dor/services/indexing_service.rb
Expand Up @@ -119,6 +119,7 @@ def self.reindex_pid(pid, *args)

# given a list of pids, retrieve those objects from fedora, index each to solr, optionally commit
def self.reindex_pid_list(pid_list, should_commit = false)
Deprecation.warn(self, 'reindex_pid_list is deprecated and will be removed in dor-services 7')
pid_list.each { |pid| reindex_pid pid, raise_errors: false } # use the default logger, don't let individual errors nuke the rest of the batch
ActiveFedora.solr.conn.commit if should_commit
end
Expand Down
1 change: 1 addition & 0 deletions spec/services/indexing_service_spec.rb
Expand Up @@ -94,6 +94,7 @@

describe '#reindex_pid_list' do
before do
expect(Deprecation).to receive(:warn)
@mock_solr_conn = double(ActiveFedora.solr.conn)
end

Expand Down

0 comments on commit 8df263d

Please sign in to comment.