Merged in [16703] from sasha@dashcare.nl:
Ref #2231 - Fix send-review-reminders and add it to daily cron
This fixes a syntax error and a Python 3 incompatibility, and adds
send-review-reminders to the daily cron script.
Important notes:
- I have not tested to what degree the existing reminders work as they
should, as that's out of scope. It does have tests.
- I can't assess whether the virtualenv activation works in the
production setup, and it may be obsolete as bin/daily also
activates the virtualenv.
- The same Python 3 incompatibility (execfile() no longer exists) seems
to exist in various other scripts.
- Legacy-Id: 16821
Note: SVN reference [16703] has been migrated to Git commit 296b126c70
This commit is contained in:
commit
d798196f5a
|
@ -50,3 +50,5 @@ $DTDIR/ietf/bin/rfc-editor-index-updates -d 1969-01-01
|
|||
# Fetch meeting attendance data from ietf.org/registration/attendees
|
||||
$DTDIR/ietf/manage.py fetch_meeting_attendance --latest 2
|
||||
|
||||
# Send reminders originating from the review app
|
||||
$DTDIR/ietf/bin/send-review-reminders
|
||||
|
|
|
@ -373,7 +373,7 @@ for key in keys:
|
|||
i = unmerged_branch_commits[branch].index(rev)
|
||||
if not i == 0:
|
||||
unmerged = True
|
||||
sys.stderr.write("There are unmerged commits ahead of r%s on branch %s:\n" % (rev, branch))
|
||||
sys.stderr.write("There are unmerged commits ahead of r%s on branch ^/%s:\n" % (rev, branch))
|
||||
for j in range(0,i):
|
||||
commit = unmerged_branch_commits[branch][j]
|
||||
if commit != rev:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# -*- conf-mode -*-
|
||||
|
||||
/personal/rjs/6.104.1.dev0@16809 # Local changes, not for merge
|
||||
/personal/rjs/6.103.1.dev0@16761 # Fixed in a different manner in [16757]
|
||||
|
||||
/personal/rcross/6.99.2.dev0@16607 # Code review found an issue
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os, sys
|
||||
import os
|
||||
import sys
|
||||
import syslog
|
||||
|
||||
# boilerplate
|
||||
|
@ -10,7 +11,9 @@ os.environ["DJANGO_SETTINGS_MODULE"] = "ietf.settings"
|
|||
|
||||
virtualenv_activation = os.path.join(basedir, "env", "bin", "activate_this.py")
|
||||
if os.path.exists(virtualenv_activation):
|
||||
execfile(virtualenv_activation, dict(__file__=virtualenv_activation))
|
||||
with open(virtualenv_activation, 'rb') as f:
|
||||
code = compile(f.read(), virtualenv_activation, 'exec')
|
||||
exec(code, globals=dict(__name__="__main__", __file__=virtualenv_activation))
|
||||
|
||||
syslog.openlog(os.path.basename(__file__), syslog.LOG_PID, syslog.LOG_USER)
|
||||
|
||||
|
@ -27,11 +30,10 @@ today = datetime.date.today()
|
|||
|
||||
for assignment in review_assignments_needing_reviewer_reminder(today):
|
||||
email_reviewer_reminder(assignment.review_request)
|
||||
for review_assignment in assignments.review_req.reviewassignment_set.all():
|
||||
for review_assignment in assignment.review_req.reviewassignment_set.all():
|
||||
print("Emailed reminder to {} for review of {} in {} (req. id {})".format(review_assignment.reviewer.address, assignment.review_req.doc_id, assignment.review_req.team.acronym, assignment.review_req.pk))
|
||||
|
||||
for assignment, secretary_role in review_assignments_needing_secretary_reminder(today):
|
||||
email_secretary_reminder(assignment.review_request, secretary_role)
|
||||
review_req = assignment.review_request
|
||||
print("Emailed reminder to {} for review of {} in {} (req. id {})".format(secretary_role.email.address, review_req.doc_id, review_req.team.acronym, review_req.pk))
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
# --- Add entries at the top ---
|
||||
|
||||
/personal/rjs/6.104.1.dev0@16810
|
||||
|
||||
/branch/dash/main@16670
|
||||
|
||||
/personal/rjs/6.100.1.dev0@16629
|
||||
|
|
Loading…
Reference in a new issue