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

Grab the label from the file_set import URL #918

Merged
merged 3 commits into from
May 10, 2017

Conversation

mjgiarlo
Copy link
Member

@mjgiarlo mjgiarlo commented May 8, 2017

Removes AttachFilesActor which has been subsumed by CreateWithFilesActor and AttachFilesToWorkJob.

Fixes samvera/hyku#1021

@mjgiarlo
Copy link
Member Author

mjgiarlo commented May 8, 2017

May depend on samvera/browse-everything#167 (also WIP)

@mjgiarlo mjgiarlo force-pushed the grab_label_from_import_url_hyku/1021 branch from 447cec7 to b48cc4b Compare May 9, 2017 21:31
@mjgiarlo mjgiarlo changed the title [WIP] Grab the label from the file_set import URL. Grab the label from the file_set import URL May 9, 2017
@@ -39,7 +39,7 @@ def validate_files(files, env)
# @return [TrueClass]
def attach_files(files, env)
return true unless files
AttachFilesToWorkJob.perform_later(env.curation_concern, files)
AttachFilesToWorkJob.perform_later(env.curation_concern, files, env.attributes.to_h.symbolize_keys)
Copy link
Member Author

Choose a reason for hiding this comment

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

The new arg here does what line 43 of the AttachFilesActor did. It makes sure that e.g. embargo attrs are available for FileSets in the actor stack.

@@ -31,10 +31,9 @@ def perform(file_set, operation)
# on a machine that did not have this temp file on it's file system.
# NOTE: The return status may be successful even if the content never attaches.
if Hyrax::Actors::FileSetActor.new(file_set, user).create_content(f, 'original_file', false)
# send message to user on download success
Hyrax.config.callback.run(:after_import_url_success, file_set, user)
Copy link
Member Author

Choose a reason for hiding this comment

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

Don't bother sending a notification if the import succeeded. User will already get notified when the FileSet is attached to the Work.

@mjgiarlo mjgiarlo force-pushed the grab_label_from_import_url_hyku/1021 branch from f6ef2f1 to d144920 Compare May 9, 2017 22:10
@mjgiarlo
Copy link
Member Author

mjgiarlo commented May 9, 2017

@jcoyne This is ready for review, good sir.

@jcoyne jcoyne merged commit 2f7ab5f into master May 10, 2017
@jcoyne jcoyne deleted the grab_label_from_import_url_hyku/1021 branch May 10, 2017 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants