-
Notifications
You must be signed in to change notification settings - Fork 8
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
Contribution expired notification #304
Conversation
No new packages were introduced in this PR, so the snyk errors should be ignored (for the sake of this PR, to be addressed separately.) |
|
||
@staticmethod | ||
def process_task(task): | ||
from grant.proposal.models import ProposalContribution |
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.
avoiding circular deps?
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.
Yep, unfortunately all of the job classes seem to need to handle it this way.
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.
Lovely! Works great.
I've no strong opinion on whether to add a contribution.status. It would be fairly painless to add if needed at some point.
I did notice, in the course of testing, that attempting to make two contributions in a row sends the user directly to "Success" modal content w/o payment info. I'll make an issue for that.
Part of #198.
What This Does
Creates a new task that gets made on contribution creation. 24h after the contribution is made, if it's still pending, emails the user to indicate the contribution has expired. Doesn't change anything in the database, simply sends the notification. This of course does not work on anonymous contributions.
Maybe we should add a new
contribution.status
for expired contributions instead of it being kind of implicit, let me know what y'all think.Steps to Test
task
tablehttp://localhost:5000/api/v1/task
, confirm you get an expiry emailtask
row is createdScreenshots