-
Notifications
You must be signed in to change notification settings - Fork 166
Async proofing calls (LG-3330) #4213
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
Closed
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
7f84efb
configure activejob
f327e17
vendor proof job
3de885f
remove use of instance_variable_set
ca9f549
placeholder
9f367be
placeholder 2
d338b76
placeholder 3
76e7af5
placeholder 4
9061a2a
placeholder number 5
f69a612
placeholder 6
84d36ca
fix specs
a7b73cc
rubocop
f2a5d7c
remove method
79f5fc9
some cleanup
1d8d888
cleaning up a bit
81b3343
Update app/services/idv/steps/verify_step.rb
3233040
Complete rest of constructor refactor suggestion (#4215)
zachmargolis 9683c68
remove and returns
36662f7
remove todo
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| class ApplicationJob < ActiveJob::Base | ||
| # Automatically retry jobs that encountered a deadlock | ||
| # retry_on ActiveRecord::Deadlocked | ||
|
|
||
| # Most jobs are safe to ignore if the underlying records are no longer available | ||
| # discard_on ActiveJob::DeserializationError | ||
| end |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| class VendorProofJob < ApplicationJob | ||
| queue_as :default | ||
|
|
||
| def perform(document_capture_session_id, stages) | ||
| # binding.pry | ||
| dcs = DocumentCaptureSession.find_by(uuid: document_capture_session_id) | ||
| result = dcs.load_proofing_result | ||
| stages = stages.map(&:to_sym) | ||
| idv_result = Idv::Agent.new(result.pii).proof(*stages) | ||
| dcs.store_proofing_result(result.pii, idv_result) | ||
| end | ||
| end |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,6 @@ | ||
| module Idv | ||
| class Session | ||
| VALID_SESSION_ATTRIBUTES = %i[ | ||
| async_result_id | ||
| async_result_started_at | ||
|
Comment on lines
-4
to
-5
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😂 |
||
| address_verification_mechanism | ||
| applicant | ||
| vendor_phone_confirmation | ||
|
|
@@ -15,7 +13,6 @@ class Session | |
| profile_step_params | ||
| personal_key | ||
| resolution_successful | ||
| selected_jurisdiction | ||
| step_attempts | ||
| ].freeze | ||
|
|
||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
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.
one idea, I know I mentioned it in chat, but just posting for posterity:
In case anybody in the future expects the old behavior of any key in the hash getting turned into an instance variable, but that not happening because it's not listed here, one idea would be to delete from a copy as we go, and error if there are any left: