-
Notifications
You must be signed in to change notification settings - Fork 5
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
base: main
Are you sure you want to change the base?
Conversation
3bce0c6
to
a839170
Compare
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.
Mostly just questions.
app/jobs/ingest_dspace_asset_job.rb
Outdated
# 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) |
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.
Can you describe how this is different than the IngestFolderJob?
app/services/dspace_ingester.rb
Outdated
"DspaceResource" | ||
end | ||
|
||
IngestDspaceAssetJob.perform_now( |
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.
Any reason this is in the foreground?
app/services/dspace_ingester.rb
Outdated
end | ||
|
||
def dir_path | ||
download_file_path = Rails.root.join("tmp") |
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.
Are we gonna run out of disk space doing this?
|
||
require "io/console" | ||
|
||
namespace :figgy do |
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.
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." |
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.
Are you planning to run like a bunch of these rake task, or is there a loop or something?
b9dc1ed
to
796cf4a
Compare
5d8544c
to
6122d93
Compare
…ake tasks, IngestDspaceAssetJob, DspaceIngester, DspaceCollectionIngester, DspaceCommunityIngester for importing DSpace resources over the REST API
1fd69e0
to
1ffa1c5
Compare
This advances pulibrary/dspace-development#864