feat: optimize log indexes

This commit is contained in:
Jason Song committed 2022-11-25 17:48:45 +08:00
1 parent bb4963fd4a
commit dd5b2c5dfd
7 files changed
+59 -25

No files matched your search

+1 -1
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())