1
1
mirror of https://github.com/go-gitea/gitea synced 2025-09-28 03:28:13 +00:00

feat: optimize log indexes

This commit is contained in:
Jason Song
2022-10-18 17:17:58 +08:00
parent bb4963fd4a
commit dd5b2c5dfd
7 changed files with 59 additions and 25 deletions

View File

@@ -179,7 +179,7 @@ func BuildViewPost(ctx *context.Context) {
if cursor.Cursor < step.LogLength || step.LogLength < 0 {
index := step.LogIndex + cursor.Cursor
length := step.LogLength - cursor.Cursor
offset := task.LogIndexes[index]
offset := (*task.LogIndexes)[index]
logRows, err = bots.ReadLogs(ctx, task.LogURL, offset, length)
if err != nil {
ctx.Error(http.StatusInternalServerError, err.Error())