Skip to content

Commit 04dcb6c

Browse files
v1.21.0 (#184)
* Fixes admin query order by * perf: increase session lifespan to 30 mins --------- Co-authored-by: andhreljaKern <[email protected]>
1 parent d5300f1 commit 04dcb6c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

global_objects/admin_queries.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ def __get_template_usage(organization_id: str = "", as_query: bool = False):
7474
INNER JOIN organization o
7575
ON st.organization_id = o.id
7676
{org_where}
77-
group BY 1"""
77+
group BY 1
78+
ORDER BY 1
79+
"""
7880
if as_query:
7981
return query
8082
return general.execute_all(query)
@@ -1098,6 +1100,7 @@ def __get_users_by_org(
10981100
ON u.organization_id = o.id
10991101
{where_add}
11001102
GROUP BY 1,2
1103+
ORDER BY 1,2
11011104
"""
11021105
if as_query:
11031106
return query

session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def start_session_cleanup_thread():
101101
def __start_session_cleanup():
102102
while True:
103103
with session_lock:
104-
sessions = general.get_session_lookup(exclude_last_x_seconds=20 * 60)
104+
sessions = general.get_session_lookup(exclude_last_x_seconds=30 * 60)
105105
for session in sessions:
106106
try:
107107
general.force_remove_and_refresh_session_by_id(

0 commit comments

Comments
 (0)