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

🎁 Add listener for handling file set attachment #317

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Jan 18, 2024

Why a listener and not a transaction? In part because the moment I want
to perform the conditional enqueuing is at the point where the
Hyrax::WorkUploadsHandler does it's job. That is when we have:

  • the parent work
  • the file set
  • the original file
  • the user

The Hyrax::WorkUploadsHandler is most analogous to the behavior in
Hyrax::Actors::FileSetActor#attach_to_work and
Hyrax::Actors::FileSetActor#create_content. Fortunately, Hyrax's
transaction and upload handler remove the conditional handling we needed
between uploading a remote file and directly uploading a file.

Related to:

Why a listener and not a transaction?  In part because the moment I want
to perform the conditional enqueuing is at the point where the
`Hyrax::WorkUploadsHandler` does it's job.  That is when we have:

- the parent work
- the file set
- the original file
- the user

The `Hyrax::WorkUploadsHandler` is most analogous to the behavior in
`Hyrax::Actors::FileSetActor#attach_to_work` and
`Hyrax::Actors::FileSetActor#create_content`.  Fortunately, Hyrax's
transaction and upload handler remove the conditional handling we needed
between uploading a remote file and directly uploading a file.

Related to:

- scientist-softserv/hykuup_knapsack#35
- scientist-softserv/hykuup_knapsack#99
- #312
@jeremyf jeremyf force-pushed the add-listener-for-file-set-attach branch from fdbb925 to a0ea1de Compare January 19, 2024 18:06
@jeremyf jeremyf merged commit 3fa2d4b into main Jan 22, 2024
9 checks passed
@jeremyf jeremyf deleted the add-listener-for-file-set-attach branch February 23, 2024 15:32
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.

2 participants