Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

laritakr
Copy link
Collaborator

@laritakr laritakr commented Jan 9, 2024

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.

@laritakr laritakr added the major-ver for release notes label Jan 9, 2024
@@ -2,6 +2,6 @@

class ReindexItemJob < ApplicationJob
def perform(item)
item.update_index
Hyrax.index_adapter.save(resource: item)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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?

Copy link
Collaborator

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...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was the error i received:
image

@@ -2,6 +2,6 @@

class ReindexItemJob < ApplicationJob
def perform(item)
item.update_index
Hyrax.index_adapter.save(resource: item)
Copy link
Collaborator

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...

@ShanaLMoore ShanaLMoore self-requested a review January 18, 2024 15:44
@@ -2,7 +2,7 @@

class ReindexCollectionsJob < ApplicationJob
def perform
Collection.find_each do |collection|
PcdmCollection.find_each do |collection|
Copy link
Collaborator Author

@laritakr laritakr Feb 1, 2024

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|
Copy link
Collaborator Author

@laritakr laritakr Feb 1, 2024

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?

@laritakr laritakr closed this Mar 30, 2024
@laritakr laritakr deleted the i35-reindex-jobs branch March 30, 2024 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-ver for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants