-
Notifications
You must be signed in to change notification settings - Fork 0
Send emails for new manuscripts #89
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
nuest
left a comment
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.
This is a very good first iteration and only be reading your code came important requirements/features to mind. Good work!
publications/tasks.py
Outdated
|
|
||
| def send_monthly_email(sent_by=None): | ||
| recipients = User.objects.values_list('email', flat=True) | ||
| last_month = now().replace(day=1) - timedelta(days=1) # Get last month's last day |
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.
Neat!
publications/tasks.py
Outdated
| 'publications.tasks.send_monthly_email', | ||
| schedule_type='MONTHLY', | ||
| repeats=-1, | ||
| next_run=datetime.now().replace(day=28, hour=23, minute=59) |
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.
Is next_run here setting up the first execution? I'm a bit worried about the 28 in there... does that work for all months?
Closes #42