-
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
Delete Invite #1147
Delete Invite #1147
Conversation
This patch deletes invites that are older than a week. Signed-off-by: Zishan Mirza <[email protected]>
Codecov Report
@@ Coverage Diff @@
## dev #1147 +/- ##
==========================================
- Coverage 82.73% 82.63% -0.11%
==========================================
Files 29 29
Lines 3395 3426 +31
==========================================
+ Hits 2809 2831 +22
- Misses 586 595 +9
Continue to review full report at Codecov.
|
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.
Looks good, a few comments though.
Apart from this, could you also keep track of the non-deleted invites in a similar way as the other scheduled tasks? So have a dict that you put the invite errors in and afterward print them out. If there's an issue with one of the invite deletions it should still be possible to delete the others.
So there should be 2 try-except blocks, one outside of the for loop and one per commit.
This patch updates the "if" statement, adds a "try" statement, and includes "errors". Signed-off-by: Zishan Mirza <[email protected]>
I have updated the |
Signed-off-by: Zishan Mirza <[email protected]>
This patch updates "expiration". Signed-off-by: Zishan Mirza <[email protected]>
I have updated |
This patch adds a unit test. Signed-off-by: Zishan Mirza <[email protected]>
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.
There was one tiny typo and also we need to save the error message and print that out. Also shouldn't raise in the inner try except, otherwise it will not continue with the next invite.
This patch updates the "delete_invite" function. Signed-off-by: Zishan Mirza <[email protected]>
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.
Looks good!
This patch deletes invites that are older than a week.
Fixes #1137.
dev
branch