-
Notifications
You must be signed in to change notification settings - Fork 0
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
Send Hold/Recall requests to ILLiad #1913
Conversation
app/models/concerns/illiadable.rb
Outdated
|
||
# Mixin for requests that should be sent to ILLiad for initial handling | ||
module Illiadable | ||
def submit! |
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.
Using modules that override methods on the class they are mixed into, isn't the easiet to read. Is there a reason this is needed? I see that HoldRecall#submit! already calls SubmitIlliadRequestJob can we modify Scan#submit to call SubmitIlliadRequestJob directly?
even better might be to convert this module to a new class (e.g. IlliadRequest) and have a method on the "Illiadable" requests like #illiad_request. I think there is value in separating the concept of "The user made a request" and "We made this ILL request to fulfull the users request"
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.
I'm fine just not including this method in the mixin – I figured if you mixed in Illiadable it'd be because you want to submit the request via ILLiad, but in the case of scans we also want to do something else, so it's fine to just be explicit instead.
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.
Updated to remove the method and make Scan#submit!
explicitly call the illiad job
2f2c3bd
to
402b090
Compare
Closes #1889
shared_configs PRs to turn it on:
https://github.com/sul-dlss/shared_configs/pull/2087
https://github.com/sul-dlss/shared_configs/pull/2088
https://github.com/sul-dlss/shared_configs/pull/2089