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

Implementing support for ingesting DSpace resources using Rake tasks #6649

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

jrgriffiniii
Copy link
Contributor

Copy link
Contributor

@tpendragon tpendragon left a comment

Choose a reason for hiding this comment

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

Mostly just questions.

# frozen_string_literal: true
class IngestDspaceAssetJob < ApplicationJob
# DataSpace assets are treated as ScannedResources
def perform(directory:, property: nil, change_set_param: nil, class_name: "ScannedResource", file_filters: [], **attributes)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you describe how this is different than the IngestFolderJob?

"DspaceResource"
end

IngestDspaceAssetJob.perform_now(
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason this is in the foreground?

end

def dir_path
download_file_path = Rails.root.join("tmp")
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we gonna run out of disk space doing this?


require "io/console"

namespace :figgy do
Copy link
Contributor

Choose a reason for hiding this comment

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

What's all this for? Is this just for testing, or is ingest a two step process - get the token and pass it in? If it's two steps, can we fold that in?

@@ -37,5 +37,19 @@ namespace :figgy do
ingester = JsonIngester.new(json_path: file_path, logger: @logger)
ingester.ingest!
end

desc "Ingest a DSpace asset."
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you planning to run like a bunch of these rake task, or is there a loop or something?

@jrgriffiniii jrgriffiniii force-pushed the jrgriffiniii-dspace-ingest-rake branch from b9dc1ed to 796cf4a Compare March 20, 2025 14:05
@jrgriffiniii jrgriffiniii marked this pull request as draft March 21, 2025 19:01
@jrgriffiniii jrgriffiniii force-pushed the jrgriffiniii-dspace-ingest-rake branch 4 times, most recently from 5d8544c to 6122d93 Compare March 24, 2025 19:12
…ake tasks, IngestDspaceAssetJob, DspaceIngester, DspaceCollectionIngester, DspaceCommunityIngester for importing DSpace resources over the REST API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants