Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion global_objects/admin_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ def __get_template_usage(organization_id: str = "", as_query: bool = False):
INNER JOIN organization o
ON st.organization_id = o.id
{org_where}
group BY 1"""
group BY 1
ORDER BY 1
"""
if as_query:
return query
return general.execute_all(query)
Expand Down Expand Up @@ -1098,6 +1100,7 @@ def __get_users_by_org(
ON u.organization_id = o.id
{where_add}
GROUP BY 1,2
ORDER BY 1,2
"""
if as_query:
return query
Expand Down
2 changes: 1 addition & 1 deletion session.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def start_session_cleanup_thread():
def __start_session_cleanup():
while True:
with session_lock:
sessions = general.get_session_lookup(exclude_last_x_seconds=20 * 60)
sessions = general.get_session_lookup(exclude_last_x_seconds=30 * 60)
for session in sessions:
try:
general.force_remove_and_refresh_session_by_id(
Expand Down