-
Notifications
You must be signed in to change notification settings - Fork 4
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
Implement MARC export workflow #909
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jazairi
force-pushed
the
ETD-546-alma-oclc-export
branch
from
February 15, 2022 18:00
08452f3
to
4cf7ee7
Compare
JPrevost
approved these changes
Feb 16, 2022
@JPrevost I just pushed a refactor to use the tempfiles as attachments. Could you re-review? |
JPrevost
reviewed
Feb 18, 2022
JPrevost
approved these changes
Feb 22, 2022
Why these changes are being introduced: We need an automated way to export published records as MARC and send them to the cataloging team. Relevant ticket(s): https://mitlibraries.atlassian.net/browse/ETD-564 How this addresses that need: * Adds a MarcBatch model that builds a compressed marcxml file from an array of theses. * Adds a BatchMailer that attaches a compressed marcxml file built by the MarcBatch model and sends it to the cataloging team. * Adds a MarcExportJob that takes an array of theses, builds a marcxml file for them, and sends a BatchMailer email. * Updates DspacePublicationResultsJob to run MarcExportJob for all published theses in the results queue. Side effects of this change: * MarcExportJob doesn't employ the 'prep job' pattern that we use elsewhere. It didn't seem necessary here to differentiate between processing a single thesis versus an array, since I couldn't figure a use case for exporting a single thesis. If I'm wrong about that, this can easily be refactored. * We are using `deliver_now` instead of enqueueing the email because ActiveJob doesn't support tempfiles as attachments. We consider this low-risk as we already use `deliver_now` to send mail in the DspacePublicationResultsJob.
jazairi
force-pushed
the
ETD-546-alma-oclc-export
branch
from
February 22, 2022 18:54
c1789d8
to
9643ddb
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why these changes are being introduced:
We need an automated way to export published records as MARC and
send them to the cataloging team.
Relevant ticket(s):
https://mitlibraries.atlassian.net/browse/ETD-564
How this addresses that need:
file from an array of theses.
built by the MarcBatch model and sends it to the cataloging
team.
a marcxml file for them, and sends a BatchMailer email.
all published theses in the results queue.
Side effects of this change:
elsewhere. It didn't seem necessary here to differentiate between
processing a single thesis versus an array, since I couldn't
figure a use case for exporting a single thesis. If I'm wrong
about that, this can easily be refactored.
explicitly unlinked in the MarcBatch class, so we pass binary data
to the mailer instead. This felt safer than relying on garbage
collection, but it's a bit less direct than reading the tempfile
in the mailer.
Developer
our guide and
all issues introduced by these changes have been resolved or opened as new
issues (link to those issues in the Pull Request details above)
Code Reviewer
(not just this pull request message)
Requires database migrations?
NO
Includes new or updated dependencies?
NO