mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Don't construct a set
This commit is contained in:
parent
ba110a2030
commit
f8f14ba466
@ -492,17 +492,14 @@ class RegistrationWorkerStore(SQLBaseStore):
|
|||||||
|
|
||||||
regex = re.compile(r"^@(\d+):")
|
regex = re.compile(r"^@(\d+):")
|
||||||
|
|
||||||
found = set()
|
max_found = 0
|
||||||
|
|
||||||
for (user_id,) in txn:
|
for (user_id,) in txn:
|
||||||
match = regex.search(user_id)
|
match = regex.search(user_id)
|
||||||
if match:
|
if match:
|
||||||
found.add(int(match.group(1)))
|
max_found = max(int(match.group(1)), max_found)
|
||||||
|
|
||||||
if not found:
|
return max_found + 1
|
||||||
return 1
|
|
||||||
|
|
||||||
return max(found) + 1
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
(
|
(
|
||||||
|
Loading…
Reference in New Issue
Block a user