Skip to content

Commit 0df613f

Browse files
committed
Update queries to use rc_source following schema change
rc_new and rc_type no longer exist Drop support for Python 3.7 (we're using 3.9 on Toolforge) Remove Python tox tests, to be restored by someone who knows what they're doing :-P
1 parent db2c64c commit 0df613f

File tree

2 files changed

+3
-31
lines changed

2 files changed

+3
-31
lines changed

.github/workflows/python.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

reports.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def autopatrol_eligibles(self):
186186
# The user was human
187187
rc_bot = 0 AND
188188
# It was a new page
189-
rc_new = 1 AND
189+
rc_source = 'mb.new' AND
190190
# It's not a redirect
191191
page_is_redirect = 0 AND
192192
# User doesn't already have autoreviewer
@@ -214,7 +214,7 @@ def autopatrol_eligibles(self):
214214
def new_wikiprojects(self):
215215
query = """SELECT rc_timestamp, rc_title
216216
FROM recentchanges
217-
WHERE rc_new = 1
217+
WHERE rc_source = 'mb.new'
218218
AND rc_namespace = 4
219219
AND rc_title LIKE 'WikiProject%'
220220
AND rc_title NOT LIKE '%/%'
@@ -469,7 +469,7 @@ def most_edited_page_last_month(self):
469469
# Make the query
470470
query = """SELECT rc_title, count(*) as num_edits
471471
FROM recentchanges
472-
WHERE rc_namespace = 0 AND rc_type < 2
472+
WHERE rc_namespace = 0 AND rc_source IN ('mw.edit', 'mw.new')
473473
GROUP BY 1 ORDER BY 2 DESC
474474
LIMIT 25;"""
475475

0 commit comments

Comments
 (0)