-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Valkyrize the reindexer jobs #2147
Conversation
@@ -2,6 +2,6 @@ | |||
|
|||
class ReindexItemJob < ApplicationJob | |||
def perform(item) | |||
item.update_index | |||
Hyrax.index_adapter.save(resource: item) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hyrax.index_adapter.save(resource: item) | |
Hyrax.query_service.find_all_of_model(model: item.class).each do |resource| | |
Hyrax.index_adapter.save(resource: item) | |
end |
Should this turn into the above, based on our convo with Rob? Would this work if there are existing active fedora objects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to blow away my env to confirm ^^ checking now though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -2,6 +2,6 @@ | |||
|
|||
class ReindexItemJob < ApplicationJob | |||
def perform(item) | |||
item.update_index | |||
Hyrax.index_adapter.save(resource: item) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to blow away my env to confirm ^^ checking now though...
@@ -2,7 +2,7 @@ | |||
|
|||
class ReindexCollectionsJob < ApplicationJob | |||
def perform | |||
Collection.find_each do |collection| | |||
PcdmCollection.find_each do |collection| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be changed to use the config collection class. Possibly should also reference multiple models?
@@ -2,6 +2,8 @@ | |||
|
|||
class ReindexAdminSetsJob < ApplicationJob | |||
def perform | |||
AdminSet.find_each(&:update_index) | |||
AdministrativeSet.find_each do |admin_set| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be changed to use the config admin set class. Possibly should also reference multiple models?
Ref scientist-softserv/hykuup_knapsack#35
The current reindex wouldn't work for Valkyrie resources. However this change only picks up the new collection types, ignoring the ActiveFedora types.
Starting this as a draft to note the need for SOME change, even though this may not be adequate.