Merge pull request #511 from camptocamp/19.0-fix-performance

[PERF] fix performance hit
This commit is contained in:
Alexandre Fayolle authored and GitHub committed 2026-02-16 15:13:20 +01:00
commit 9d25a5dc56
1 file changed
+3 -10
+3 -10
View File
@@ -176,17 +176,10 @@ class RedisSessionStore(SessionStore):
identifiers = set(identifiers)
not_found = set()
for partial_sid in identifiers:
try:
next(
self.redis.scan_iter(
match=f"{self.prefix}{partial_sid}*",
count=1,
)
)
except StopIteration:
# No matches found
key = f"session::{self.prefix}:{partial_sid}*"
match = self.redis.keys(pattern=key)
if not match:
not_found.add(partial_sid)
return not_found
def delete_from_identifiers(self, identifiers: builtins.list[PartialSid]):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.