Don't construct a set

pull/6420/head
Erik Johnston 2019-11-26 16:06:41 +00:00
parent ba110a2030
commit f8f14ba466
1 changed files with 3 additions and 6 deletions

View File

@ -492,17 +492,14 @@ class RegistrationWorkerStore(SQLBaseStore):
regex = re.compile(r"^@(\d+):")
found = set()
max_found = 0
for (user_id,) in txn:
match = regex.search(user_id)
if match:
found.add(int(match.group(1)))
max_found = max(int(match.group(1)), max_found)
if not found:
return 1
return max(found) + 1
return max_found + 1
return (
(