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 verification email in async task #268
Conversation
This pull request has been linked to Shortcut Story #14589: Create task to resend email on failure. |
@@ -347,7 +347,7 @@ func (s *Server) TenantStats(c *gin.Context) { | |||
Count: int64(totalKeys), | |||
}, | |||
{ | |||
Name: "usage_kbytes", | |||
Name: "storage", |
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.
Request from @masskoder
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.
Probably if we're going to change this we should make the usage a string with the units in the string rather than a number. We can follow up on that later though.
@@ -116,6 +117,7 @@ func (s *quarterdeckTestSuite) TestRegister() { | |||
s.CheckError(err, http.StatusConflict, "user or organization already exists") | |||
|
|||
// Test that one verify email was sent to each user | |||
s.StopTasks() |
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 think this should avoid the race condition for now, let me know if there's a more delicate way to wait for the current tasks to stop without having to reset the entire task manager.
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.
Ah, I didn't think about race conditions with respect to the tests. You're right that this is a pretty tricky situation.
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 putting this together so quickly! I'll merge and deploy as soon as the tests pass.
Scope of changes
This updates the Quarterdeck register endpoint so that we're not blocked waiting for emails to send after the user has been created in the database.
Fixes SC-14589
Type of change
Acceptance criteria
Describe how reviewers can test this change to be sure that it works correctly. Add a checklist if possible.
Author checklist
Reviewer(s) checklist