app/models/spotlight/resource.rb in blacklight-spotlight-0.13.0 vs app/models/spotlight/resource.rb in blacklight-spotlight-0.14.0
- old
+ new
@@ -16,12 +16,15 @@
:last_indexed_estimate,
:last_indexed_count,
:last_index_elapsed_time,
:last_indexed_finished], coder: JSON
+ enum index_status: [:waiting, :completed, :errored]
+
around_index :reindex_with_logging
after_index :commit
+ after_index :completed!
def becomes_provider
klass = Spotlight::ResourceProvider.for_resource(self)
if klass
@@ -44,9 +47,10 @@
end
##
# Enqueue an asynchronous reindexing job for this resource
def reindex_later
+ waiting!
Spotlight::ReindexJob.perform_later(self)
end
concerning :GeneratingSolrDocuments do
##