-
Notifications
You must be signed in to change notification settings - Fork 9
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
#1770 Send All Email Statuses to VA Profile #1889
Conversation
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 added a couple links to our PR template for easier referencing of our docs since we were talking about how we might best follow our guidelines in the last process improvement meeting.
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.
Thank you for adding the links
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.
Approved - I have reviewed the new code against the AC, our testing guidelines, and our style guidelines
retry_backoff=True, | ||
retry_backoff_max=3600, | ||
) | ||
def send_email_status_to_va_profile(notification_data: dict) -> None: |
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.
Nit and not a blocker:
Should send_va_profile_email_status
and send_email_status_to_va_profile
all be in one method.
Right now it appears send_email_status_to_va_profile
only responsibility is to call send_va_profile_email_status
and raise an exception if it fails.
Is it currently setup this way so AutoRetry functions properly?
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.
send_email_status_to_va_profile
defines the celery task. I was originally collecting the info from the notification there too, but that had to get moved out to the calling function because info passed to a celery task has to be json serializable. I also don't want to define a celery task within the VAProfileClient
class itself either. So this is what we are left with. Hopefully that makes sense.
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.
Sounds good to me!
Description
This is the work to send all email statuses to VA Profile. It's creating a new callback to send the statuses to VA Profile specifically via the endpoint they've set up to receive them.
This spins off a new celery task, which is kicked of alongside our usual callbacks.
New functions added:
check_and_queue_va_profile_email_status_callback
send_email_status_to_va_profile
(celery task)send_va_profile_email_status
issue #1770
Type of change
Please check the relevant option(s).
How Has This Been Tested?
Logs showing a 200 response from VA Profile in Dev.
Checklist