Optimize listing of logs by changing to bucket by datetime, over which we have an index
This commit is contained in:
parent
9f09d68ad8
commit
d4c74bc1d3
3 changed files with 46 additions and 27 deletions
|
@ -48,9 +48,11 @@ class TableLogsModel(ActionLogsDataInterface):
|
|||
ignore=filter_kinds, model=m)
|
||||
|
||||
logs, next_page_token = model.modelutil.paginate(logs_query, m,
|
||||
descending=True, page_token=page_token,
|
||||
descending=True,
|
||||
page_token=page_token,
|
||||
limit=20,
|
||||
max_page=max_page_count)
|
||||
max_page=max_page_count,
|
||||
sort_field_name='datetime')
|
||||
return LogEntriesPage([Log.for_logentry(log) for log in logs], next_page_token)
|
||||
|
||||
# First check the LogEntry3 table for the most recent logs, unless we've been expressly told
|
||||
|
|
Reference in a new issue