-
Notifications
You must be signed in to change notification settings - Fork 826
[bug 1085456] Support Forum metrics email report. #2359
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
Conversation
|
I like the idea of using groups for this instead of having a hard coded list. That makes less work for us later. Since this requires the groups to exist or else it fails, I think we should use a migration to add them (though they can be populated manually). If it is easy to test, something like "running the cronjob sends an email" that would be cool, but I don't think it is needed, especially if it needs refactoring. Looks good! |
e29fe08 to
887eb79
Compare
|
OK, writing a test was worthwhile as I found a typo/bug. Now this is ready for r? |
kitsune/questions/tests/test_cron.py
Outdated
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.
Typo
|
fixord ^^ |
kitsune/questions/cron.py
Outdated
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 just realize this is probably going to look really weird in a plain text email, because it will have lots of extra space. Or does send_email deal with that?
|
Besides the white space thing, this looks good. r+ once that is fixed. |
This sends a daily email to users in the Support Forum Metrics group.
380cfc2 to
d37c030
Compare
[bug 1085456] Support Forum metrics email report.
I wanted some feedback here before going further.
Instead of hard-coding users and email addresses, I went with two groups. The group of users to track and the group of users to send the report to. Is that cool?
If that's cool, should we create the groups in a migration? I'm pretty sure we've always created new groups in the admin, but I'm game either way.
Does this need a test? It seems like a throwaway script. I'd probably need to refactor it to make it testable. Actually, I can probably poke at the email with django's test infra.
f?