Skip to content

Commit

Permalink
Merge pull request #475 from sul-dlss/delete-service
Browse files Browse the repository at this point in the history
Update method of deleting objects from fedora and solr
  • Loading branch information
jmartin-sul committed Oct 23, 2019
2 parents 816e347 + a4a308a commit a8708e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/services/delete_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def remove_active_workflows
#
# @param [string] pid the druid
def delete_from_dor
Dor::Config.fedora.client["objects/#{druid}"].delete
Dor::SearchService.solr.delete_by_id(druid)
Dor::SearchService.solr.commit
ActiveFedora::Base.connection_for_pid(0).api.purge_object(pid: druid)
ActiveFedora::SolrService.instance.conn.delete_by_id(druid)
ActiveFedora::SolrService.instance.conn.commit
end
end

0 comments on commit a8708e5

Please sign in to comment.